如何格式化电子邮件正文? [英] How to format email body?

查看:132
本文介绍了如何格式化电子邮件正文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从 Excel 打开 Outlook 电子邮件.

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.

这是我打开电子邮件的 VBA 代码:

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

推荐答案

您需要使用 HTML 邮件格式:

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

这篇关于如何格式化电子邮件正文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆