+ Reply to Thread
Results 1 to 4 of 4

VBA to Paste Special (Enhanced Metafile) from clipboard, crop, and set.

  1. #1
    Registered User
    Join Date
    04-02-2019
    Location
    Toronto, Canada
    MS-Off Ver
    2016
    Posts
    2

    VBA to Paste Special (Enhanced Metafile) from clipboard, crop, and set.

    Hey there,

    I do a ton of excel copy and pasting in excel from autocad.
    I would like to find a way to write a script to paste a picture from my clipboard, as an Enhanced Metafile, and then have it cropped (dimensions tbd) and then set to a location (Cell B1).

    I've been able to paste and crop a normal file, but have been stuck since.

    Any hints?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: VBA to Paste Special (Enhanced Metafile) from clipboard, crop, and set.

    Hello Mortysauce,

    I am assuming you have a Mac since your Office version appears as 2016. As far as I know, with a Mac you cannot paste a picture from the clipboard using VBA. However, if you are using PC, you can do this. I won't post the code unless you have a PC and tell me the version of Windows you have since it affects the API code.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    04-02-2019
    Location
    Toronto, Canada
    MS-Off Ver
    2016
    Posts
    2

    Re: VBA to Paste Special (Enhanced Metafile) from clipboard, crop, and set.

    I have a PC, and I checked my account and it say I have Microsoft home and business.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: VBA to Paste Special (Enhanced Metafile) from clipboard, crop, and set.

    Hello Mortysauce,

    Here is the version for 32 bit CPU systems. If you have problems compiling this code then you have a 64 bit CPU system and I will have to post the code in a separate post due to the size of the post.

    Copy this code into a new VBA Module in your workbook. Let me know if you have any compile issues and we'll go to the next step

    Please Login or Register  to view this content.
    .

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 01-12-2015, 02:42 PM
  2. Replies: 0
    Last Post: 07-06-2014, 06:38 PM
  3. [SOLVED] VBA Macro to Copy from Excel and Paste Special Picture (Enhanced Metafile) in Outlook
    By Webman1012 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-19-2013, 11:19 AM
  4. Paste Enhanced Metafile in Outlook Email
    By ulaikamor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2012, 12:31 PM
  5. Pasting as an Enhanced Metafile in powerpoint
    By BlueIndian in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-01-2011, 08:24 AM
  6. Copying and Pasting with Enhanced Metafile
    By dsaboo10 in forum Excel General
    Replies: 7
    Last Post: 06-24-2010, 02:55 PM
  7. [SOLVED] Paste Special, Metafile
    By JB in Kansas in forum Excel General
    Replies: 1
    Last Post: 02-23-2005, 04:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1