+ Reply to Thread
Results 1 to 5 of 5

Copy range as image to Outlook

  1. #1
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Copy range as image to Outlook

    Hi,

    Trying to copy a range to an outlook mail I've created. I've tried to implemenet some code found here http://stackoverflow.com/questions/2...l-as-a-picture but i'm getting a variable not defined error on the "wDoc.rng.PasteAndFormat Type:=wdPasteBitmap" line. I want to use late binding as I will be distributing the code. So far:

    Please Login or Register  to view this content.
    Any ideas ?

    Thanks,
    amphi

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Copy range as image to Outlook

    If you are using late binding, the respective object model is not exposed to you. In other words your code does not know what wdPasteBitmap enumerated constant is. You should use the number (i.e. 4) instead.
    If you are pleased with a member's answer then use the Star icon to rate it.

  3. #3
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Copy range as image to Outlook

    Thanks buran. I've also tried that but I get an object doesn't support this method/property error...

  4. #4
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: Copy range as image to Outlook

    I would suggest to post the code you have tried this with. I.e. this solution solves the variable not defined error.
    In your code you have there are at least two more error.
    Please Login or Register  to view this content.
    it's not clear .GetInspector for which object is

    and second - wdDoc does not have rng method for sure.

  5. #5
    Forum Contributor
    Join Date
    05-30-2013
    Location
    France
    MS-Off Ver
    2010
    Posts
    260

    Re: Copy range as image to Outlook

    Tried this line
    Please Login or Register  to view this content.
    .
    I've also tried completing the line
    Please Login or Register  to view this content.
    I agree there are surely some more bugs...

+ 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. Copy Range to Outlook
    By IFeelYourPain in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2014, 01:22 PM
  2. Macro to copy/paste range as an image...
    By jpcsolutions in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-25-2014, 02:06 PM
  3. copy range and image & paste into outlook
    By sankar kasilingam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-31-2013, 05:48 AM
  4. [SOLVED] Copy image range excel to paint
    By Taislin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2012, 12:31 AM
  5. Copy & Paste image from a folder to an outlook mail
    By blue J in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-27-2012, 07:15 AM
  6. [SOLVED] sending Email (via outlook) from Excel with cell range and image from external file
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2012, 11:10 AM
  7. Excel 2007 VBA Copy Range EXcluding Picture/Image
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2012, 12:20 AM

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