outlook 2010 自動密送Email
以下功能請勿非法使用:
密抄到多人這個需要用到巨集
方法一:
1、在Outlook裡面鍵入ALT+F11打開VBA編輯器
2、展開“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
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、可增刪BCC收件人地址
5、保存關閉VBA編輯器
6、進入“工具-信任中心”,在“宏安全性”選擇中
7、選擇“為所有宏提供警告”或者“不執行宏安全性檢查”(建議選擇前者)
8、選擇“為所有宏提供警告”重新開機Outlook,會有詢問提示
現在你發出去的每一封郵件都自動抄送給了代碼中設置的那些BCC收件人了。
----------
方法二:
在outlook裡面設置裡面降低宏安全性;
重啟outlook;
Alt+F11後,選擇左側的thisoutlooksession,在彈出的視窗中加入以下內容:
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
strBcc = "wayne_tong@qq.com" '請改成你要密送的郵寄地址
Set objRecip
= Item.Recipients.Add(strBcc)
objRecip.Type = olBCC
If Not objRecip.Resolve Then
strMsg = "不能解析密件副本人郵寄地址,
" & _
"請確認是否仍然發送郵件?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"不能解析密件副本人郵寄地址")
If res = vbNo Then
Cancel = True
End If
End If
Set objRecip = Nothing
End Sub
保存重啟outlook即可。
重點是要降低宏安全性,並適當重啟。代碼部分只需要修改紅字部分即可
轉自: http://will0690.blog.163.com/blog/static/45668020109142012742/