Outlook2016中如何实现自动密送
下面的方案您可以参考一下:
1)在Outlook里面键入Alt+F11打开VBA编辑器;
2)激活左边的工程面板,展开并双击上面的“Project (VbaProject.OTM)/Microsoft Office Outlook 对象/ThisOutlookSession”;
3)将下面的代码粘贴到右边打开的编辑区里面去:
Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim objRecip As Recipient
Dim strMsg As String
Dim res As Integer
Dim strBcc As String
On Error Resume Next
' #### USER OPTIONS ####
' address for Bcc — must be SMTP address or resolvable
' to a name in the address book
strBcc = "[email protected]"
Set objRecip = Item.Recipients.Add(strBcc)
objRecip.Type = olBCC
If Not objRecip.Resolve Then
strMsg = "Could not resolve the Bcc recipient. " & _
"Do you want still to send the message?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"Could Not Resolve Bcc Recipient")
If res = vbNo Then
Cancel = True
End If
End If
Set objRecip = Nothing
End Sub
4)根据需要在上面代码中的注释增删BCC收件人地址;保存,退出VBA编辑器,返回Outlook主界面
5)选择菜单“工具-信任中心”,在弹出窗口中选择“宏安全性”,选择“为所有宏提供警告”或者“不执行宏安全性检查”(建议选择前者);
6)重新启动Outlook,看到提示是否否用宏,选择启用。
7)现在,新建邮件中虽然看不到密送收件人,但是发出去的每一封邮件都会自动抄送给了代码中设置的那些BCC收件人了。