VBA generated HTML text for Outlook

hardrock

Registered User.
Local time
Today, 16:03
Joined
Apr 5, 2007
Messages
166
Hi All, I use this bit of code to generate an Outlook email body with the contents of strBody. How can I modify this so the HTML generated is in "Courier new" font size 11? I've looked everywhere for an example and failed. Thanks

With MailOutLook
.To = Recipient
.CC = RecipientCopy
.Subject = Subject
.BodyFormat = olFormatHTML
.Body = StrBody

.display

End With
 
You need to add Style to your HTML tags, what does the StrBody contain?
 
.HTMLBody=strBody
 
Hi Paul StrBody is just a few lines of text at the moment
 
Code:
strBody = "[COLOR=Red][B]<P STYLE='font-family:courier new;font-size:11'>[/B][/COLOR]Hello World !![COLOR=Red][B]</P>[/B][/COLOR]"

With MailOutLook
    .To = Recipient
    .CC = RecipientCopy
    .Subject = Subject
    [COLOR=Red][B].HTMLBody[/B][/COLOR] = strBody
    .Display
End With
 

Users who are viewing this thread

Back
Top Bottom