0
一旦我在Outlook中打開預約,然後我想通過使用vba腳本將jpg插入到邀請的正文中,這些將以jpg形式顯示電話細節。VBA Outlook插入圖像到Appintment
Const MyPath = "C:\diallist\"
Const MyPicture = "TestDialList.jpg"
Dim myItem As Object
Set myItem = Application.ActiveInspector.CurrentItem()
myItem.MeetingStatus = olMeeting
.Attachments.Add MyPath & MyPicture
.HTMLBody = "<html><p>This is a picture</p>" & "<img src=cid:" & _ Replace(MyPicture, " ", "%20") & " height=240 width=180>"
.Display
End With
任何幫助感激地收到。
但是,現在,當邀請到達另一端時,您會得到一個空白的邊框,並且會出現錯誤。鏈接的圖像無法顯示,文件可能已被移動,重命名或刪除。確認鏈接指向正確的文件和位置。 – vbvirg20
忽略它,因爲我在Application.ActiveInspector.WordEditor.Shapes.AddPicture的末尾有',True,False。 – vbvirg20