HTMLBody Property of Outlook MailItem
I'm using Access to automate mailing in Outlook, and I have the message
working and can control some of the attributes--font name, bold, and
italic--but I'm having trouble with font size. I'm using the following
code with the MailItem. If I leave it out, the message body defaults
to font size 12. If I put it in, regardless of the size I specify, the
message body changes to font size 36.
oMsg.HTMLBody = "HTMLBODYFONT SIZE=" & """12""" & "" & "Test" &
"/BODY/HTML" It evaluates as HTMLBODYFONT
SIZE="12"Test/BODY/HTML, which works fine on a web page but won't
work in my Outlook message.
I also can't figure out how to get the color specified by the user of
the application. I capture the font attributes they specify for a text
box containing the message in one module in a table, then use them to
construct the HTML, but the color numbers in the Access text box don't
seem to match the colors required by HTML. Is there a translation
table somewhere?
Would appreciate any help I can get. This is my first time trying to
format Outlook messages.
|