问题描述
我有一个创建电子邮件的功能。
I have a function that creates an email.
功能SendAnEmail()
Function SendAnEmail()
Dim morder,mchecklist As Variant
Dim morder, mchecklist As Variant
Dim objOutlook As New Outlook.Application
Dim objOutlook As New Outlook.Application
Dim objOLJournal As Outlook.mapiFolder
Dim objOLJournal As Outlook.mapiFolder
Dim objNamespace As Outlook.NameSpace
Dim objNamespace As Outlook.NameSpace
Dim objMessage As Outlook.MailItem
Dim objMessage As Outlook.MailItem
设置objNamespace = objOutlook.GetNamespace(" MAPI")
Set objNamespace = objOutlook.GetNamespace("MAPI")
设置objOLJournal = objNamespace.GetDefaultFolder(olFolderOutbox)
Set objOLJournal = objNamespace.GetDefaultFolder(olFolderOutbox)
设置objMessage = objOLJournal.Items.Add(olMailItem)
Set objMessage = objOLJournal.Items.Add(olMailItem)
objMessage.SentOnBehalfOfName = ThisEmail()
objMessage.SentOnBehalfOfName = ThisEmail()
objMessage.To = ToEmail()
objMessage.To = ToEmail()
objMessage.CC = ThisEmail()
objMessage.CC = ThisEmail()
objMessage.Subject =" Puts In A Subject"
objMessage.Subject = "Puts In A Subject"
objMessage.Attachments.Add morder
objMessage.Attachments.Add morder
objMessage.Attachments.Add mchecklist
objMessage.Attachments.Add mchecklist
objMessage.Body = SingleEmailSubject& vbNewLine& vbNewLine& "放入免责声明"
objMessage.Body = SingleEmailSubject & vbNewLine & vbNewLine & "Puts in a disclaimer"
objMessage.Save
objMessage.Save
objMessage.Display
objMessage.Display
结束函数
我希望身体的最后一部分是粗体和更大的字体,但我无法弄清楚这样做。 任何帮助将不胜感激。
I want the last part of the body to be bold and a larger font but I can't figure out how to do that. Any help would be appreciated.
推荐答案
objMessage.HTMLBody = _
"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><HTML><HEAD><META content='text/html; charset=iso-8859-1' http-equiv=Content-Type><META name=GENERATOR content='MSHTML 9.00.8112.16871'><STYLE></STYLE></HEAD><BODY><DIV>" & _
SingleEmailSubject & _
"</DIV><DIV> </DIV><DIV><FONT size=5><STRONG>" & _
"Puts in a disclaimer." & _
"</STRONG></FONT></DIV><DIV> </DIV></BODY></HTML>"
这篇关于看看身体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!