在电子邮件中加入文本和红色字体

时间:2015-11-05 12:09:18

标签: excel vba excel-vba html-email

我的代码(下面)完全可以作为更大的VBA代码的一部分。但是我想强调一些粗体和一行红色的文字,我不确定如何。

我希望电子邮件看起来如何:

enter image description here

.body = "Hello" & Chr(13) & Chr(13) _
& "The attached PICS and Benefits have been flagged as impacting your business or finance area. As such, these will require your approval before being presented to the funding board as part of the project investment board submission." & Chr(13) & Chr(13) _
& "1) Project Accountants: " & Chr(13) _
& "If you approve of the attached PICS and Benefits, please respond to this email stat[![enter image description here][1]][1]ing your approval, CC the FBS Projects Team and forward on this email to the relevant BAU (L4) Business Approver. Should you wish to query or revise the attached view, please liaise with your relevant FBS contact." & Chr(13) & Chr(13) _
& "2)  BAU Business Approvers: " & Chr(13) _
& " If you approve of the attached PICS and Benefits, please respond to this email stating your approval, CC the FBS Projects Team and the Project Accountant (accountant stated on the attached).Should you wish to query or revise the attached view, please liaise with the relevant Project Accountant." & Chr(13) & Chr(13) _
& "3)  BAU Finance Approvers: " & Chr(13) _
& "If you approve of the attached PICS and Benefits, please respond to this email stating your approval, CC the FBS Projects Team and the Project Accountant (accountant stated on the attached). Should you wish to query or revise the attached view, please liaise with the relevant Project Accountant." & Chr(13) & Chr(13) _
& "***Please ensure the email thread is continued to maintain the audit trail***" & Chr(13) & Chr(13) _
& "Kind regards,"

1 个答案:

答案 0 :(得分:1)

我认为您必须使用HTML格式才能使用粗体文本并更改文本颜色。您可以编辑格式,以完全按照您的要求查看..

.HTMLBody = "<p style='font-family:Arial;font-size:12'>" & _
"Hello<br><br>" & _
"The attached PICS and Benefits have been flagged as impacting your business or finance area. As such, these will require your approval before being presented to the funding board as part of the project investment board submission.<br><br>" & _
"<B>1) Project Accountants:</B><br>" & _
"If you approve of the attached PICS and Benefits, please respond to this email stat[![enter image description here][1]][1]ing your approval, CC the FBS Projects Team and forward on this email to the relevant BAU (L4) Business Approver. Should you wish to query or revise the attached view, please liaise with your relevant FBS contact.<br><br>" & _
"<B>2)  BAU Business Approvers:</B><br>" & _
"If you approve of the attached PICS and Benefits, please respond to this email stating your approval, CC the FBS Projects Team and the Project Accountant (accountant stated on the attached).Should you wish to query or revise the attached view, please liaise with the relevant Project Accountant.<br><br>" & _
"<B>3)  BAU Finance Approvers:</B><br>" & _
"If you approve of the attached PICS and Benefits, please respond to this email stating your approval, CC the FBS Projects Team and the Project Accountant (accountant stated on the attached). Should you wish to query or revise the attached view, please liaise with the relevant Project Accountant.<br><br>" & _
"<font color=""red"">***Please ensure the email thread is continued to maintain the audit trail***</font><br><br>" & _
"Kind regards,</p>"