给Outlook添加BCC到指定邮箱的功能
单位邮箱的空间太小,只有几十M,发送几个大邮件后就会占满邮箱空间了,对于收件箱中的邮件可以通过Pop3进行备份,但是发件箱中的邮件备份比较麻烦,Outlook默认没有BCC到指定邮箱的功能,不过我们可以用宏来解决这个难题,步骤如下:[*]Alt+F11打开宏编辑器
[*]在工程面板中打开“Project (VbaProject.OTM)/Microsoft Office Outlook 对象/ThisOutlookSession”;
[*]输入以下的代码:
Option Explicit
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim oItem As MailItem
Dim oRecipient As Recipient
If Item Is Nothing Then
Else
If TypeOf Item Is Outlook.MailItem Then
Set oItem = Item
' 在这里参考如下代码根据需要增删BCC收件人
Set oRecipient = oItem.Recipients.Add("izhangronghua@gmail.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 If
End If
End Sub
[*]保存并退出宏编辑器
[*]Outlook的“工具”->“信任中心”->“宏安全性”中选择“为所有宏提供警告”。
经过以上的操作后,以后所有发送的邮件都会自动BCC到指定的邮箱中,起到了备份的作用。
页:
[1]