Link to home
Start Free TrialLog in
Avatar of HaimD
HaimD

asked on

How can I code in Excel VBA for a picture to be emailed?

In Excel, I have written a macro that creates an email (pre-populated with the person in the "To" field, the "BCC" field, the "Subject" field, and some simple text in the message body area).

However, I do not know how to get a picture pre-populated into the message body area.

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you are planning to insert a chart as picture and you are using Outlook you may try the link below:
http://www.rondebruin.nl/mail/folder2/chart.htm

I also got the code below which might can be useful to you (source: http://www.codeforexcelandoutlook.com/excel-vba/send-email-from-excel/)
.HTMLBody = "<BODY><FONT face=Arial color=#000080 size=2></FONT>" & _
            "<IMG alt='' hspace=0 src='cid:EmailTemp.gif' align=baseline 0rder=0>&nbsp;" & _
            "<br><br>Plus add any text you want</BODY>"

Open in new window