我有一个宏代码,用于在excel Activesheet中的电子邮件正文中附加图片。 我的问题是:
有什么想法吗?
Sub create_email_2()
Dim oApp As Outlook.Application
Dim email As Outlook.MailItem
Dim inspect As Outlook.Inspector
Dim content As Object
Set oApp = New Outlook.Application
Set email = oApp.CreateItem(olMailItem)
With email
.To = "magic@gmail.com"
.Subject = "E-mail2"
.htmbody = "Hello" & "</p>" _
& "Please see bellow current status" & "</p>" _
& "Thank you" & "</body></html>"
.Display
Set inspect = email.GetInspector
Set content = inspect.WordEditor
ActiveSheet.Pictures(1).Copy
content.Application.Selection.Start = Len(.Body)
content.Application.Selection.Paste
'ActiveSheet.Pictures(2).Copy
'content.Application.Selection.Start = Len(.Body)
'content.Application.Selection.Paste
.Save
'.Send
End With
End Sub