【发布时间】:2015-10-07 20:36:29
【问题描述】:
我想弄清楚如何将 Excel 中的电子表格中的图片放入 Outlook 邮件的正文中。这是我到目前为止所拥有的:
它根据我需要的数据分组创建图片,
将其复制到下面,然后
打开包含我需要的初始消息的邮件
但我不知道如何将创建的两个图像链接到电子邮件正文中。到目前为止,我一直在从每个创建的标签中剪切它们,然后将它们粘贴到正文中。
Sub EmailDashboards()
Dim OutApp As Object
Dim outMail As Object
Sheets("CAM Dashboard Burdened").Select
Range("C1:J47").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Range("K36").Select
ActiveSheet.Paste
Sheets("CAM Dashboard Direct").Select
Range("C1:J47").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Range("K36").Select
ActiveSheet.Paste
Sheets("CAM Dashboard Burdened").Select
Range("K36").Select
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set OutApp = CreateObject("Outlook.Application")
Set outMail = OutApp.CreateItem(0)
With outMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "CCM EV Dashboard"
.Body = "Here are the latest Burdened and Direct EV Dashboards for your area: "
.Display
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set outMail = Nothing
Set OutApp = Nothing
End Sub
【问题讨论】: