簡體   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