Pictures in mail item body

  • Thread starter Thread starter Ivan Debono
  • Start date Start date
I

Ivan Debono

Hi all,

I have an htm page that I opened in internet explorer and saved as archive
(mht). Then I opened the mht file in word, did some changes and saved it as
a doc. The doc has various pictures.

I create an email message and insert the doc contents (copy from word and
paste into email message), and save the email as a draft. I have a macro
that sends an email to a recipient based on this draft. The code is:

Set oMal = Application.CreateItem(olMailItem)
With oMal
.To = emailaddress
.Subject = mydraft.Subject
.BodyFormat = olFormatHTML
.HTMLBody = mydraft.HTMLBody
.Send
End With

But when I send the email, it arrives without pictures.

How is it possible to do the above but the pictures are also included?

Thanks,
Ivan
 
Getting pictures into an HTML message programmatically. HTMLBody contains on the <html></html> text. It does not include the pictures that are referred to inside the <html> element. Those would have to be added as attachments and set up in the manner demonstrated at http://www.outlookcode.com/d/code.htm#htmlimg.

Instead of creating a new message, why don't you make a copy of the item in Drafts and send the copy?



--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Copy Content of html email text+snapshots to doc file

Hi Sue, the link http://www.outlookcode.com/d/code.htm#htmlimg is not accessible anymore. I need to be able to copy the content of a mail with its snapshots to a doc file knowing that the body format is not word. when i have the editor word, I am able to copy the content easily. I am writing in c sharp.

Thanks in advance
 
Back
Top