2016-07-26 99 views
1

我目前拥有完美的代码,可以将我开放的活动工作簿发送给我指定的任何人。使用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 

回答

0

你应该能够在.BCC线使用通讯组列表的名称,但我没有测试过这一点。

.BCC = "Daily Matrix" 

欲了解更多信息,请参阅herehere

+0

这没有奏效! – markos

+0

非常奇怪,但是当我键入分配列表的名称时,出现:“Outlook无法识别一个或多个名称” – markos

相关问题