在Outlook中如何实现自动密抄给多个人?
来源:百度知道 编辑:UC知道 时间:2024/06/02 02:35:53
俺是说自动~~自动密抄给多个人!!
这个需要用到宏的,具体步骤如下:
1、在Outlook里面键入ALT+F11打开VBA编辑器;
2、键入CTRL+R激活左边的那个工程面板,展开并双击上面的“Project (VbaProject.OTM)\Microsoft Office Outlook 对象\ThisOutlookSession”;
3、将下面的代码粘贴到右边打开的编辑区里面去:
Option Explicit
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim oItem As MailItem
Dim oRecipient As Recipient
Set oItem = Item
' 在这里参考如下代码根据需要增删BCC收件人
Set oRecipient = oItem.Recipients.Add("user1@server1.com")
oRecipient.Type = Outlook.olBCC
Set oRecipient = oItem.Recipients.Add("user2@server2.com")
oRecipient.Type = Outlook.olBCC
Set oRecipient = oItem.Recipients.Add("user3@server3.com")
oRecipient.Type = Outlook.olBCC
oItem.Recipients.ResolveAll
oItem.Save
Set oRecipient = Nothing
Set oItem = Nothing
End Sub
4、根据需要按照我上面代码中的注释增删BC