繁体   English   中英

如何在 SENT 电子邮件 Outlook 2010 VBA 中隐藏密件抄送字段

[英]How to hide BCC field in SENT email Outlook 2010 VBA

我有一个宏编码到一个规则,自动转发所有传入和发送的电子邮件到密件抄送字段中的私人电子邮件地址(在服务器级别禁用任何自动密件抄送规则。)在董事会的帮助下,宏可以完美地工作,并且出于所有意图和目的是不可见的。

但是,如果您在 SENT FOLDER 中打开 SENT 消息,BCC 字段对所有人可见。 我了解到这是 Outlook 中的一个“功能”,显然是从 2003 年开始的。

查看 SENT 电子邮件时,有没有办法抑制 BCC 字段的可见性?

或者有没有一种方法可以将单个文件夹的显示选项设置为不显示密件抄送 - 永远?

感谢您提供任何帮助。

我的代码:

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
      Dim answer
      Dim oAtt
      Dim strProc1 As String

On Error GoTo Application_ItemSend_Error

strBcc = "myprivateemail@gmail.com"

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

On Error GoTo 0
Exit Sub

Application_ItemSend_Error:

MsgBox "Error " & Err.Number & " (" & Err.Description & ") " & "Error on 
Line " & Erl & " in procedure Application_ItemSend of VBA Document
ThisOutlookSession"

End Sub

如果要删除 Sent Items 文件夹中的 BCC 收件人,请侦听 Sent Items 文件夹上的 Items.ItemAdd 事件,遍历MailItem.Recipients集合中的所有收件人并删除Recipient.Type = olBCC

“BCC 字段对所有人可见,全世界都可以看到”

好吧,如果世界上任何人都可以查看您自己的已发送文件夹,那么就是这种情况。 否则 BCC 字段不是电子邮件的一部分,收件人不会收到它。 该功能的目标是能够召回您自己的密件抄送消息,这样您就不会忘记您已经发送了它们。

尝试以下...

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim olRec As Outlook.Recipient
    Dim Address$

    Address = "Om3r@blala.com"

    Set olRec = Item.Recipients.Add(Address)
    olRec.Type = olBCC
    olRec.Resolve
End Sub

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM