Pictures in mail item body

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
 
S

Sue Mosher [MVP-Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top