使用Outlook将电子邮件发送到通讯组列表
问题描述:
我目前拥有完美的代码,可以将我开放的活动工作簿发送给我指定的任何人。使用Outlook将电子邮件发送到通讯组列表
不过,我想工作簿发送到我的Outlook联系人的通讯组列表名为“每日黑客帝国”,并希望他们BCC。我不知道如何做到这一点和帮助,将不胜感激。谢谢!
Sub Mail_Workbook_1()
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 = ""
.CC = ""
.BCC = ""
.Subject = "Daily Matrix"
.Body = "PLEASE DO NOT DISTRIBUTE-FOR INTERNAL USE ONLY"
.Attachments.Add ActiveWorkbook.FullName
' You can add other files by uncommenting the following line.
'.Attachments.Add ("C:\test.txt")
' In place of the following statement, you can use ".Display" to
' display the mail.
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
这没有奏效! – markos
非常奇怪,但是当我键入分配列表的名称时,出现:“Outlook无法识别一个或多个名称” – markos