|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub SendEmail()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim i, arr
Dim OutlookApp As Outlook.Application
Dim OutlookItem As Outlook.MailItem
Sheets("Goldenlist Data").Copy
ActiveWorkbook.Close True, "D:\" & "Golden sample daily check list" & Format(Now(), "yyyymmdd") & ".xlsx"
m = Split([a2], ";")
pic = "<img src=" & ThisWorkbook.path & "\图表1.jpg /><br />"
pic = pic + "<img src=" & ThisWorkbook.path & "\666.jpg /><br />"
Set OutlookApp = New Outlook.Application
Set OutlookItem = OutlookApp.CreateItem(olMailItem)
With OutlookItem
Adress = [a2]: Title = [b2]: Text = [c2]: 抄送 = [d2]: 附件 = "D:\" & "Golden sample daily check list" & Format(Now(), "yyyymmdd") & ".xlsx"
.To = Adress
.Subject = Title
.CC = 抄送
.HTMLBody = Text & pic
.Attachments.Add 附件
.Display
.Send
End With
Kill ThisWorkbook.path & "\666.jpg"
MsgBox "Send Complete!", 64, "Tips!"
End Sub
修改再用。。。 |
评分
-
1
查看全部评分
-
|