+ Reply to Thread
Results 1 to 4 of 4

Paste Enhanced Metafile in Outlook Email

  1. #1
    Registered User
    Join Date
    09-13-2010
    Location
    Lisbon
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question Paste Enhanced Metafile in Outlook Email

    Hello all,

    I am writing an Excel VBA Macro that will send an email with an HTML body using a predefined template.

    But, before the email is sent, I need to Paste an Enhanced Metafile object in the Email's HTML body in a specific position. The Enhanced Metafile object comes from a copy to clipboard of a group of charts present in the Excel workbook to which the Macro is associated.

    Does anyone have any idea how this can be done?

    Thanks.
    Last edited by ulaikamor; 09-16-2010 at 10:28 AM.

  2. #2
    Registered User
    Join Date
    09-13-2010
    Location
    Lisbon
    MS-Off Ver
    Excel 2007
    Posts
    3

    Thumbs up Re: Paste Enhanced Metafile in Outlook Email

    Well, I was able to solve my problem. The following code snippet worked:

    Please Login or Register  to view this content.

    The move instructions before the PasteSpecial command was the only way I found to move inside the email body. It's pretty rudimentary, so if anyone knows a way to find a specific text (for example, a tag I inserted in the template to signal where the object should be pasted) within the email body and select it, let me know.

    And now, as is usually the case, after solving one problem, another arises. The object inside the email is too big and i need to resize it. Any ideas?

  3. #3
    Registered User
    Join Date
    09-13-2010
    Location
    Lisbon
    MS-Off Ver
    Excel 2007
    Posts
    3

    Talking Re: Paste Enhanced Metafile in Outlook Email

    Hi again,

    I solved the issue with resizing the object. Basically, I just copied the group object and pasted it on another worksheet as enhanced metafile and then resized it there.

    I concluded it would be easier to work the object in Excel first than to do it in an outlook mail.

    Then it was just a simple matter of copying the new object and paste it in the email.

    Please Login or Register  to view this content.

    I would still like to improve those move commands inside the email body. Maybe change it to something using find. I would appreciate any suggestions.

  4. #4
    Registered User
    Join Date
    10-22-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Paste Enhanced Metafile in Outlook Email

    Can you post the full code you used for this? I have been trying to figure out how to copy cells from Excel and paste as enhanced metafile in an email in Outlook, but I can't find any information on how to do that. Your example above seems like it might have what I'm looking for, but I need the rest of the code. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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