【发布时间】:2014-05-31 05:24:50
【问题描述】:
我有一个文件夹test,其中包含以下文件user1.xlsx , user2.xlsx , user3.xlsx
在我的工作电子表格work.xlsx 我有相应的地址
user1.xlsx user1name@gmail.com
user2.xlsx user2name@yahoo.com
...
如何将带有附加 user1 、 user2 .xlsx 文件的电子邮件发送到相应的电子邮件
'Email
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = userVar
.SentOnBehalfOfName = "xxxx"
.CC = ""
.BCC = ""
.Subject = "...
.Body = "...
.Attachments. .. ??
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
'Close
【问题讨论】: