我正在嘗試將託管圖片插入到我的郵件正文中。以下是我迄今所做的:vba outlook embed image url
Private Sub inspectors_NewInspector(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector) Handles inspectors.NewInspector
Dim mailItem As Outlook.MailItem = TryCast(Inspector.CurrentItem, Outlook.MailItem)
If Not (mailItem Is Nothing) Then
If mailItem.EntryID Is Nothing Then
mailItem.Subject = "Test"
mailItem.Body = mailItem.Body + "<html><img src='http://example.com/pixel.php?to=" + mailItem.To + "></html>"
End If
End If
End Sub
上述刀片實際上犯規嵌入圖像,它只是增加了線路:
<html><img src='http://example.com/pixel.php?to=" + mailItem.To + "></html>
要我我的電子郵件正文。
我怎樣才能得到它嵌入?
mailItem.Body是你需要使用mailItem.HTMLBody – Sorceri