Trying to paste a range into Outlook as bitmap image

  • Re: Trying to paste a range into Outlook as bitmap image


    Thanks Andy


    i got this code from dicks-blog.com
    Searched and tried many more in web. This is much closer than other



    regards Youtham

  • Re: Trying to paste a range into Outlook as bitmap image


    Thanks a million andy


    but facing problem with this code line


    HTML
    1. objMail.HTMLBody = "<html><p>This is a picture.</p>" & _
    2. "<img src='cid:pictest.jpg'>"


    regards, Youtham

  • Re: Trying to paste a range into Outlook as bitmap image


    This was the only alteration I made to the code which is just the file location.

    Code
    1. Set l_Attach = colAttach.Add("c:\temp\graphic.jpg")


    Is that what you did and it displayed a red cross?

  • Re: Trying to paste a range into Outlook as bitmap image


    Dear Andy


    tools reference CDO for NTS 1.2 library and CDO for windows 2000 library


    this is the code. i used



    regards, Youtham

  • Re: Trying to paste a range into Outlook as bitmap image


    I can get the red cross if I leave out the cid: for <img src=myident>


    This routine works for me using xl2003 and outlook 2003

  • Re: Trying to paste a range into Outlook as bitmap image


    I'm out of ideas then, sorry.


    Oh well one more idea or rather a debug...
    run the code and then when the email is created with the red cross right click in the body and pick View Source.
    Post the contents of the html body maybe that will help cure your problem.

  • Re: Trying to paste a range into Outlook as bitmap image


    Here what mine generated.

    Code
    1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    2. <HTML><HEAD>
    3. <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
    4. <META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
    5. <BODY>
    6. <P>This is a picture.</P><IMG src="cid:myident"></BODY></HTML>


    you could try emailing the email too me

  • Re: Trying to paste a range into Outlook as bitmap image


    Nice.... :)


    I get an attachment. I wonder if using Word as your email editor has an effect or whether it's a setting in outlook doing something with inserts.


    Could you try another test with it done manually?

  • Re: Trying to paste a range into Outlook as bitmap image


    Andy


    got the source code but not the image


    HTML
    1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    2. <HTML><HEAD>
    3. <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
    4. <META content="MSHTML 6.00.2800.1491" name=GENERATOR></HEAD>
    5. <BODY>
    6. <P>This is a picture.</P><IMG src="cid:myident"></BODY></HTML>


    regards, Youtham