Adding Color and Underlining to a Body of Email

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

How do you add Color and Underlining when Creating an email
using VBA ? For an Example I would like to change the Font
to Red Turn Underlining on and then Add some text, and
then turn underlining off and change color to a new color
and resume the body of the email.


Any suggestions would be appreciated.

Thanks
 
Easiest method is to create a fully tagged HTML string
with the text and formatting you want, then set the
HTMLBody property to that string to create an HTML-
formatted message, e.g.:

strText = "<strong>My text</strong>"
objItem.HTMLBody = strText


See http://www.slipstick.com/dev/formatmsg.htm for other
techniques.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top