Color certain text in red

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kan09
    New Member
    • Aug 2009
    • 19

    Color certain text in red

    Dear all,

    I have the following problem. We have a vba prcocedure that automatically send an e-mail.
    I need to insert into the body of this e-mail a text that that has a red font.

    Please assist me in how to insert this.
    I belive i shoul use the font.color = vbRed property, but i don't know how to insert it into the procedure.

    the text is something like this:

    "hellor ppl" & _

    "please to the following" & _

    font.color = vbRed "bla bla"


    how do i color that text?
    Thank's for the help.
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    #2
    You'll have to send the text in html, using html tags for the formatting using something this
    Code:
    <FONT COLOR="#FF0000">sample text</FONT>
    but I believe you could also specify 'red' instead of 'FF0000'

    Jim

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      You will also need to make sure that your intended receipents will receive HTML formatted email. I have several dozens of people that do not accept HTML formatted emails...

      Comment

      • topher23
        Recognized Expert New Member
        • Oct 2008
        • 234

        #4
        Make sure that your procedure is also set up to handle HTML. At least in the past, with Outlook automation, you could specify a body string as either
        Code:
        olMailItem.Body
        or as
        Code:
        olMailItem.HTMLbody
        .Body would always go as straight text, while .HTMLbody would parse the actual HTML.

        Comment

        Working...