开发者

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 emai开发者_JS百科l:

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


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

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜