Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / September 2003

Tip: Looking for answers? Try searching our database.

Adding Color and Underlining to a Body of Email

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 30 Sep 2003 22:13 GMT
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
Sue Mosher - 30 Sep 2003 23:21 GMT
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.
Signature

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
    http://www.outlookcode.com/jumpstart.aspx 

>-----Original Message-----
>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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.