如何在outlook中实现自动密送的方法
密抄到多人这个需要用到宏的,1、在Outlook里面键入ALT+F11打开VBA编辑器;
留言板留言友情2、键入CTRL+R激活左边的那个工程面板,展开并双击上面的“Project (VbaProject.OTM)\Microsoft Office Outlook 对象\ThisOutlookSession”;
3、将下面的代码粘贴到右边打开的编辑区里面去:
Option Explicit
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")
Dim oItem As MailItem
Dim oRecipient As Recipient
Set oItem = Item
飞机上可以带充电宝吗
' 在这里参考如下代码根据需要增删BCC收件人
Set oRecipient = oItem.Recipients.Add("user1@server1")
oRecipient.Type = Outlook.olBCC
Set oRecipient = oItem.Recipients.Add("user2@server2")
oRecipient.Type = Outlook.olBCC
Set oRecipient = oItem.Recipients.Add("user3@server3")
oRecipient.Type = Outlook.olBCC
我国珍稀植物
oItem.Recipients.ResolveAll
oItem.Save
Set oRecipient = Nothing
Set oItem = Nothing
End Sub
Set oRecipient = oItem.Recipients.Add("user2@server2")
oRecipient.Type = Outlook.olBCC
Set oRecipient = oItem.Recipients.Add("user3@server3")
oRecipient.Type = Outlook.olBCC
我国珍稀植物
oItem.Recipients.ResolveAll
oItem.Save
Set oRecipient = Nothing
Set oItem = Nothing
End Sub
4、根据需要按照我上面代码中的注释增删BCC收件人地址;
5、键入CTRL+S保存,再键入ALT+Q退出VBA编辑器返回Outlook主界面;
6、选择菜单“工具-信任中心”,在弹出窗口中选择“宏安全性”;
7、选择“为所有宏提供警告”或者“不执行宏安全性检查”(建议选择前者);
8、重新启动Outlook,看到提示是否否用宏,选择启用。
现在你发出去的每一封邮件都自动抄送给了代码中设置的那些BCC收件人了。
----------
宇文宇豪外附一则:
在outlook里面设置里面降低宏安全性;
重启outlook;
Alt+F11后,选择左侧的thisoutlooksession,在弹出的窗口中加入以下内容:
重启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 objRecip As Recipient
Dim strMsg As String
Dim res As Integer
Dim strBcc As String
On Error Resume Next
On Error Resume Next
strBcc = "wayne_tong@qq" '请改成你要密送的邮件地址
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
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即可。测试outlook2003~2010都没问题。
重点是要降低宏安全性,并适当重启。代码部分只需要修改红字部分即可
重点是要降低宏安全性,并适当重启。代码部分只需要修改红字部分即可
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论