Sub CreateHTMLMail() 'Creates a new e-mail item and modifies its properties Dim MYPIC_DIR As String: MYPIC_DIR = Environ("userprofile") & "\my documents" Dim olApp As Outlook.Application Dim objMail As Outlook.MailItem Set olApp = Outlook.Application 'Create e-mail item Set objMail = olApp.CreateItem(olMailItem) With objMail 'Set body format to HTML .BodyFormat = olFormatHTML .HTMLBody = "<HTML><H2>The body of this message will appear in HTML.</H2>" _ & "<BODY>Please enter the message text here." _ & "<img src=""" & MYPIC_DIR & "\M1.jpg"" />" _ & "<img src=""" & MYPIC_DIR & "\M2.jpg"" />" _ & "</BODY></HTML>" .Display End With End Sub
Gain unlimited access to on-demand training courses with an Experts Exchange subscription.Get Access
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE
Connect with Certified Experts to gain insight and support on specific technology challenges including: