[英]VBA Excel Sending More than one Email
我正在尝试编写一个程序,向不同的经理发送电子邮件以重新获得他们的信息。 对于某些问题,该程序将仅发送一封电子邮件,并说它已完成且没有错误。 如何使它发送所有14封电子邮件。 现在,所有电子邮件都指向我的直接电子邮件地址。 请帮忙!
Dim i As Integer
i = 1
Do While i <> 14
On Error Resume Next
With OutMail
.to = SupervisorAddress(i)
.CC = ""
.BCC = ""
.Subject = "QTF Expired"
.Body = Body(i)
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With
On Error GoTo 0
i = i + 1
Loop
Dim i As Long
For i = 1 To 14
With OutApp.CreateItem(0)
.to = SupervisorAddress(i)
.CC = ""
.BCC = ""
.Subject = "QTF Expired"
.Body = Body(i)
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With
Next
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.