Formatted Email with Access vba

J

Jeff

Hello,

I know how to send an Email via Access VBA, but how to send an email with
the text in the body that is Formatted, with Bolding, Fonts changed, colors,
etc.

I am using Access & Outlook 2003.

I tried setting the string for the bodt with some HTML Tags but this also
didnt work:

strBody = "<H1 align=center>Test of this Memo field</H1>"

Any help would be greatly apprecuated.

Thank you,
Jeff
 
S

Stefan Hoffmann

hi,
I am using Access & Outlook 2003.
I tried setting the string for the bodt with some HTML Tags but this also
didnt work:
strBody = "<H1 align=center>Test of this Memo field</H1>"
I assume you use Automation. Then you need to set

mailItem.HTMLBody = strBody


mfG
--> stefan <--
 
J

Jeff

Hi Stefan,

Thank you for your help, that worked, although after I researched what you
mentioned you need to add this as well.

mailItem.BodyFormat = olFormatHTML

so thank you as what you mentioned led me on the right track.

Thank you,
Jeff
 
Top