[英]Excel/vba latebinding HTML email
I have some code written in VBA designed to run in excel which is supposed to send a html email. 我有一些用VBA编写的旨在在excel中运行的代码,应该可以发送html电子邮件。 This worked fine originally but I have tried to late bound me code, an email is still sent however the HTML appears as plain text to the recipient. 最初,此方法运行良好,但我尝试对我的代码进行后期绑定,但仍会发送一封电子邮件,但是HTML以纯文本形式显示给收件人。 The code I have is: 我的代码是:
Dim oAPP As Object
Dim oItem As Object
Const olMailItem As Long = 0
Set oAPP = CreateObject("Outlook.Application")
Set oItem = oAPP.CreateItem(olMailItem)
With oItem
.To = Worksheets("Emails").Cells(1, 2).Value
.Subject = "Product set-up request"
.BodyFormat = 2
.Body = emailbody
.send
End With
将.Body = emailbody
更改为.HTMLBody = emailbody
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.