我正在使用Outlook腳本來轉發具有特定模板的電子郵件。我無法在<img scr=
開始時添加徽標。使用HTML添加圖像
Public Sub FW(olItem As Outlook.MailItem)
Dim olForward As Outlook.MailItem
Set olForward = olItem.Forward
Set olLogo = Outlook.Application
If InStr(olItem.Subject, "AW:") Or InStr(olItem.Subject, "WG:") Or _
InStr(olItem.Subject, "Re:") Or InStr(olItem.Subject, "FW:") Or _
InStr(olItem.Subject, "Fwd:") Then
Stop
ElseIf InStr(olItem.Subject, "CH1") Or InStr(olItem.Subject, "CH3") Then
Const Path = "T:\TEMP\"
Const Logo = "image001.jpg"
With olForward & olLogo
.Attachments.Add Path & Logo
.Subject = olItem.Subject
.BodyFormat = olFormatHTML
.HTMLBody = "<span style=color:#1F497D;font-size:11pt;font-family:calibri;>" & _
"TEXT TUTAJ<BR><BR>" & _
"TEXT TUTAJ<BR><BR>" & _
"TEXT TUTAJ<BR>" & _
"TEXT TUTAJ<BR><BR>" & _
"<span style=color:#1F497D;font-size:9pt;font-family:arial;><b>" & _
"TEXT TUTAJ</b><BR>" & _
"TEXT TUTAJ<BR>" & _
"<html><img scr=cid:" & Replace(Logo, " ", "%20") & "height=55 width=170></html><BR>" & _
"TEXT TUTAJ"
.Display
.To = ""
.CC = ""
.Send
End With
End If
'// Clean up
Set olItem = Nothing
Set olForward = Nothing
Set olLogo = Nothing
End Sub
例如您周圍是否缺少CID引號 –
怎麼會這樣?試圖添加它,只出現錯誤。 –