sepang
sepang

Reputation: 5280

How to format email body?

I'm opening an Outlook email from Excel.

I would like to format the body, e.g. using a certain font and making a few words bold.

Here is my VBA code for opening an email:

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
    .To = strRecipient
    .CC = ""
    .BCC = ""
    .subject = strSubject
    .body = strBody
    .Display
End With

Upvotes: 0

Views: 1509

Answers (1)

poke
poke

Reputation: 387507

You'll need to use the HTML mail format for that:

OutMail.BodyFormat = olFormatHTML
OutMail.HTMLBody = "<b>Bold</b>, not bold"

Upvotes: 1

Related Questions