【发布时间】:2014-09-01 10:34:58
【问题描述】:
我在 A 列中有电子邮件地址,在同一张表中有一个图表对象。
对于每个电子邮件地址,我想在 Outlook 中创建一个新邮件并将 Excel 图表粘贴到电子邮件正文中。
我尝试的问题(如下)是图表没有粘贴到邮件正文中。我该如何解决?
这是我的代码:
Sub smail()
Dim r As Integer
Dim o As Outlook.Application
Dim m As Outlook.MailItem
Set o = New Outlook.Application
r = 1
Do While Cells(r, 1) <> ""
Set m = o.CreateItem(olMailItem)
m.To = Cells(r, 1)
m.CC = "xyz@anc.com"
m.BCC = "abc@xyz.com"
m.Subject = "Test"
ActiveChart.ChartArea.Copy
Set wEditor = o.ActiveInspector.WordEditor
'm.Body = Paste
wEditor.Application.Selection.Paste
m.Send
r = r + 1
Set m = Nothing
Loop
End Sub
【问题讨论】: