提示:其他語言是Google翻譯的。 你可以訪問 English 版本。
登入
x
or
x
x
註冊
x

or

如何自動密件抄送您在Outlook中發送的所有電子郵件?

當您發送電子郵件並且您有永久密碼收件人但不希望其他收件人看到他或她的地址時,應該使用密件抄送功能。 但是,當我們需要密件抄送時,我們必須手動顯示密件抄送字段並為其選擇一個聯繫人。 為了避免這些手動操作,下面的文章將向您展示如何修改outlook以自動在發送的所有電子郵件上自動密件抄送一個電子郵件地址。

在Outlook中通過使用VBA的默認自動密件抄送

在Outlook中使用Kutools for Outlook自動創建密件抄送

將每個外發電子郵件自動抄送或密送到Outlook中的指定收件人(我)

由Kutools提供Outlook,自動CC /密件抄送功能。 單擊即可無限期享受60天的免費試用!
自動抄送給自己

Office選項卡 - 在Office中啟用選項卡式編輯和瀏覽,使工作更輕鬆......
Kutools for Outlook - 為Microsoft Outlook帶來100強大的高級功能
  • 自動CC / BCC 發送電子郵件時的規則; 自動轉發 規則多個電子郵件; 自動回复 沒有交換服務器,以及更多自動功能......
  • BCC警告 - 如果您的郵件地址在BCC列表中,當您嘗試全部回复時顯示消息; 缺少附件時提醒,以及更多提醒功能......
  • 全部附件回复(全部) 在郵件對話中; 立即回复許多電子郵件; 自動添加問候語 回复時; 自動將日期和時間添加到主題中...
  • 附件工具:自動分離,全部壓縮,全部重命名,自動全部保存... 快速報告,計算選定的郵件, 刪除重複的郵件和聯繫人...
  • 超過100高級功能將 解決你的大多數問題 在Outlook 2010-2019和365中。 全功能60天免費試用。

箭頭藍色右泡 在Outlook中使用VBA默認自動密件抄送

您可以應用下面的VBA代碼來配置Outlook中的自動密件抄送規則。 請做如下:

1。 按 其他 + F11 鍵同時打開Microsoft Visual Basic for Applications窗口。

2。 雙擊 ThisOutlookSession在“工程”窗格中,然後將VBA代碼粘貼到打開的窗口中。 看下面的截圖:

VBA代碼:發送所有電子郵件時自動密送

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
    
    ' #### USER OPTIONS ####
    ' address for Bcc -- must be SMTP address or resolvable
    ' to a name in the address book
    strBcc = "SomeEmailAddress@domain.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
End Sub

請注意: 請替換 "SomeEmailAddress@domain.com" 在上面的代碼中,您將密件抄送的電子郵件地址。

3。 保存VBA代碼並關閉Microsoft Visual Basic for Applications窗口。

從現在起,您不需要填寫密件抄送字段中的地址。 當您從outlook發送電子郵件時,隨著VBA代碼的執行,它會自動密送到您想要的收件人。


箭頭藍色右泡 在Outlook中使用Kutools for Outlook自動創建密件抄送

上面的VBA代碼對於初學者來說有些困難和麻煩,這裡是一個簡單快捷的工具,Kutools for Outlook 幫助您自動密件抄送在Outlook中發送的所有電子郵件或指定電子郵件。

安裝Kutools for Outlook後,請按如下操作:

1。 點擊 Kutools > 自動CC / BCC > 啟用自動CC / BCC (或 自動CC / BCC管理器),看截圖:
doc auto bcc kto 1

2。 在 自動CC / BCC管理器 對話框,單擊 按鈕。 看下面的截圖:

3。 在打開“自動抄送/密件抄送”對話框中,請輸入新密件抄送規則的名稱 規則名稱 框,檢查 所有的郊遊電子郵件 在選項 過濾 部分,然後單擊 收件人 按鈕。 見上面的截圖:

4。 然後你可以輸入你想要在密件中的電子郵件地址 密件抄送 - > 文本框中,或者您可以從列表中選擇您想要訪問的地址,然後單擊 密件抄送 - > 按鈕將地址放入相應的字段,然後單擊 OK 按鈕。 看下面的截圖:

5。 現在它回到了 自動CC / BCC 對話框中,要將bcc所指定的地址插入到 CC / BCC收件人姓名 框中,請點擊 OK 按鈕保存配置。 然後點擊 OK 自動抄送/密件抄送管理器“對話框中的按鈕。 看下面的截圖:

到目前為止,已經創建了密件抄送規則,當您發送電子郵件時,同一條消息將同時發送給密送收件人,並且此規則適用於您的Outlook中的任何帳戶。

筆記:
(1)使用此功能,您可以設置始終 CC 規則也是如此。
(2)您可以使用此工具根據需要創建多個規則。
(3)如果你想關閉規則,你可以點擊 啟用自動CC / BCC,所有的規則將不起作用。 您也可以取消選中規則名稱 自動CC / BCC管理器 對話框禁用一些指定的規則。


箭頭藍色右泡演示:在Outlook中使用Kutools for Outlook自動創建密件抄送

小技巧: : 在這個視頻中, Kutools 標籤是通過添加 Kutools for Outlook。 如果你需要它,請點擊 點擊瀏覽,獲取更多資訊 可以不受限制地進行60天的免費試用!


箭頭藍色右泡相關文章:

如何自動在Outlook自動自我?


Kutools for Outlook - 為Outlook帶來100高級功能,讓工作更輕鬆!

  • 自動CC / BCC 發送電子郵件時的規則; 自動轉發 多個電子郵件按自定義; 自動回复 沒有交換服務器,以及更多自動功能......
  • BCC警告 - 當您嘗試回复所有內容時顯示消息 如果您的郵件地址在BCC列表中; 缺少附件時提醒,以及更多提醒功能......
  • 回复(全部)使用郵件會話中的所有附件; 回复很多電子郵件 很快; 自動添加問候語 回复時; 將日期添加到主題...
  • 附件工具:管理所有郵件中的所有附件, 自動分離, 全部壓縮,重命名全部,全部保存...快速報告, 計算選定的郵件...
  • 強大的垃圾郵件 按慣例; 刪除重複郵件和聯繫人... 使您能夠在Outlook中更智能,更快速,更好地完成工作。
拍攝kutools outlook kutools選項卡1180x121
拍攝kutools outlook kutools加標籤1180x121
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    IT works but.. · 1 years ago
    How to set it up auto bcc to multiple email addresses?
    in outlook 2013 only had to add an additional line shown as below
    strBcc = "SomeEmailAddress1@domain.com"
    strBcc = "SomeEmailAddress2@domain.com"
    But outlook 2016 only took 2nd line to add onto bcc.
    • To post as a guest, your comment is unpublished.
      kellytte · 10 months ago
      Try Kutools for Outlook's Auto Bcc feature!
    • To post as a guest, your comment is unpublished.
      steve · 1 years ago
      same problem here, do u have a solution so far?
  • To post as a guest, your comment is unpublished.
    Ty · 1 years ago
    The VBA code works great. Thanks, but what if I want to bcc still, but only when sending to one specific email recipient?
  • To post as a guest, your comment is unpublished.
    Chris · 2 years ago
    Great job guyz.

    Thank you . Worked for Outlook 2016 .

    Wonder how can i check the From to Field in order to autobcc only from one account.

    BR
    Chris
  • To post as a guest, your comment is unpublished.
    Michael Z · 2 years ago
    Works great all day in Outlook 2010. Next day, it stopped working. I followed the instructions that SILUVIA ZHOU gave about macro security (without having to re-do the script) and it appears to work again.
  • To post as a guest, your comment is unpublished.
    Clement · 3 years ago
    Hi. Works great for my laptop and office PC but after using it for about 1 day, or sending about 20+ emails, this feature just doesn't work anymore on both my desktop and laptop.

    Anyone can help me out? I'm using outlook 2010 and 2013.

    Thanks!
  • To post as a guest, your comment is unpublished.
    Adhie Sastro Sadewo · 3 years ago
    Nice, very useful for me, Thanks
  • To post as a guest, your comment is unpublished.
    Andy · 3 years ago
    Hi guys,

    I have tried this code and whilst it does work, it only CC's and not BCC's. I only want emails that contain Ref, REF or ref in the subject line to be BCC'd.

    Is anyone able to check that I have it constructed correctly please?

    *******

    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

    Dim Msg As Outlook.MailItem
    Dim onsMapi As Outlook.NameSpace
    Dim objRecip As Recipient
    Dim strMsg As String
    Dim res As Integer
    Dim strBcc As String

    If Item.Subject = "Ref" Then
    strBcc = "email@email.com"
    ElseIf Item.Subject = "ref" Then
    strBcc = "email@email.com"
    ElseIf Item.Subject = "REF" Then
    strBcc = "email@email.com"
    End If

    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

    End Sub
    • To post as a guest, your comment is unpublished.
      Joe · 2 years ago
      If the "ref" is the only thing in your subject, then it should work fine. Although I would make a few small changes. If you put "Option Compare Text" above your first line (outside the sub) then when you're doing the comparison for your "If" statement, upper and lower case letters will be considered the same. So ref=REF=Ref=rEf=REf, etc. Then you can simplify your conditional to:
      [quote]If Item.Subject = "ref" then strBcc = "email@email.com"[/quote]

      Personally, I would also add an [else strBcc = ""] just to cover your bases.

      Now, if you want to BCC emails that contain "ref" anywhere in the subject, you can try:
      [quote]If instr(Item.Subject,"ref",1) 0[/quote]

      The instr method searches the subject for "ref" and returns a number representing the character in the subject where "ref" starts. If it doesn't find "ref", it returns a 0. A disadvantage of using this method is that you may get some false positives (e.g. the subject contains the word "prefer").

      If you want all emails with subjects that start with "ref" with anything following it, then you can use the following:
      [quote]If instr(Item.Subject,"ref",1) = 1[/quote]

      This is the same as the last one, except instead of getting all emails whose subjects contain "ref" anywhere, you'll only get emails whose subjects contain "ref" that starts with the first character.
  • To post as a guest, your comment is unpublished.
    Keshav · 3 years ago
    Can we make this work with sent items that have attachments.
  • To post as a guest, your comment is unpublished.
    SONU RAJ · 3 years ago
    Bravo!!!! Working great
  • To post as a guest, your comment is unpublished.
    JMax · 3 years ago
    Works great but after the message sends I get an extra blank message that sits in my Outbox (sometimes it has the recipient's email address). So if I send 12 msgs, I see 12 msgs in my Sent box, but is there a way to eliminate the "ghost" message just sitting in the Outbox?
  • To post as a guest, your comment is unpublished.
    OD · 4 years ago
    Thank you mate. :lol:
  • To post as a guest, your comment is unpublished.
    Prabhat · 4 years ago
    hello,

    It works fine when i put code inside the outlook. after restarting MS2007
    it is not working. Please help me
  • To post as a guest, your comment is unpublished.
    pj · 4 years ago
    It works on my win7 and outlook2010, thank you.
  • To post as a guest, your comment is unpublished.
    zeyd88 · 4 years ago
    Thank you very much.It is very good)))
  • To post as a guest, your comment is unpublished.
    Mehdidd · 4 years ago
    if someone could write it in the ItemLoad event, that would be great !
    to actually see the BCC field filled
  • To post as a guest, your comment is unpublished.
    savy · 4 years ago
    how can i use it for single account or profile?
  • To post as a guest, your comment is unpublished.
    Neil · 4 years ago
    Option 1 of using macro editor in outlook works perfect for me, just follow the instruction. I am using outlook 2013
  • To post as a guest, your comment is unpublished.
    Marc · 4 years ago
    Does anyone know a way to apply the auto bcc function to a SHARED mailbox? If you select as a filter 'custom' instead of 'All outting email', it seems that you can only select non-shared mailboxes...
  • To post as a guest, your comment is unpublished.
    SYNDenver · 5 years ago
    This macro works great in 2013 till I reboot. If I do not do anything after a reboot, it does not work, It works if I do the following after every reboot:
    I click on the developer, Visual Basic, close it,
    Then click on Macro Security, close it.

    Once I do this it works for the session. It stops again on reboot.
  • To post as a guest, your comment is unpublished.
    SYNDenver · 5 years ago
    This code works, except I find that I need to open the developer after every reboot. After a reboot, the macro does not work unless I click on developer, open the macro, close it, open the security, close it.

    Any Ideas?
  • To post as a guest, your comment is unpublished.
    Shahriar · 5 years ago
    hi,
    thanx its work nicely
    but my question is how can i use this auto BCC for multiple email, here you showed for only one email bcc, can i use this for multiple mail ?? if i can than how ?
  • To post as a guest, your comment is unpublished.
    SupremeAC · 5 years ago
    Hi there and thank you for the code. Works perfectly for me in Outlook 2013. I was wondering if there is a way to have it also work when replying to other people's mails. It seems to only work when I send a 'new' mail to someone?
  • To post as a guest, your comment is unpublished.
    Tony_Warren · 5 years ago
    Thanks.

    The autobcc works like a treat.
  • To post as a guest, your comment is unpublished.
    Kevin_Black · 5 years ago
    Hi There, I cannot get the code to work in Office2013.
    From the tools>>references menu do I need to activate any specific libraries?

    Thanks
    Kevin
  • To post as a guest, your comment is unpublished.
    Shep · 5 years ago
    Great post - really helped, the only problem is the bcc doesn't run when the mail isn't created from within Outlook - eg you right-click on a file from the desktop, send to, mailrecipient, or you click on the email file icon from within a program, and it doesn't bcc - can anyone help ?

    I also slightly modified the code, so that Outlook gives you choice whether or not to bcc the recipient.

    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 intresponse As Integer
    On Error Resume Next

    intresponse = MsgBox("Click Yes to share this email with QA, click No to keep it private", _
    vbYesNo + vbQuestion, _
    "Email Privacy")
    If intresponse = vbYes Then


    strBcc = "recipient@email.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

    End If



    End Sub
  • To post as a guest, your comment is unpublished.
    Marc · 5 years ago
    This was a very usefull post for me! I use gmail as a sort of backup for all my mail and this made it possible without people commenting on an added CC line (the only option Outlook provides as a default).
  • To post as a guest, your comment is unpublished.
    chris · 5 years ago
    Thanks for the instructions! How do i adjust this so that I can be BCC'd on all emails except to some specific email addresses or group of "@domain.com". Thanks!
  • To post as a guest, your comment is unpublished.
    Manjur Alam Bhuiyan · 5 years ago
    I face another Problem In MS office Outlook
    microsoft office outlook has encountered a problem and needs to close we are sorry for inconvenience
  • To post as a guest, your comment is unpublished.
    Manjur Alam Bhuiyan · 5 years ago
    i take help from ur site
  • To post as a guest, your comment is unpublished.
    Norbert Lars · 5 years ago
    hey,

    this VBA works nice, one question if i may ask

    is there a way to activate only to an account? for example i have 3 accounts on my compouter @yahoo, @hotmail, @gmail and i want only those sent from the @gmail account to be auto BCC but the rest to go normal

    what should be add to the script ?
    • To post as a guest, your comment is unpublished.
      Chris Cara · 5 years ago
      I am interested in this also.

      Thanks!
      • To post as a guest, your comment is unpublished.
        Harry · 5 years ago
        If you need to BCC back to some account just use Item.SendUsingAccount instead of fixed E-mail, in other words, use
        in line 10 the following:
        strBcc = Item.SendUsingAccount
        this string will find the account E-mail address which used for send and use it.
        Enjoy!
        • To post as a guest, your comment is unpublished.
          John · 4 years ago
          This would only work when you want to BCC the same email address from which you are sending email.
          What if you want to BCC different email addresses in different accounts?
          Account 1 :: 123@Gamil.com : BCC 123@abc.com
          Account 1 :: 123@Hotmail.com : BCC 123@def.com
          Account 1 :: 123@Yahoo.com : BCC 123@xyz.com
          • To post as a guest, your comment is unpublished.
            Joe · 2 years ago
            You could use conditional statements combined with the bit Harry provided to determine who to BCC. In this instance, I would use the Select Case statement:

            [quote]Select Case Item.SendUsingAccount
            Case "123@Gmail.com"
            strBcc = "123@abc.com"
            Case "123@Hotmail.com"
            strBcc = "123@def.com"
            Case "123@Yahoo.com"
            strBcc = "123@xyz.com"
            End Select[/quote]
  • To post as a guest, your comment is unpublished.
    Goups · 5 years ago
    When send the email, how i can remove the BCC from the send items, I want the Bcc to be hide in the send items.
    • To post as a guest, your comment is unpublished.
      karla123 · 5 years ago
      Hi, wondering if you found a solution to hide bcc from Sent Folder? I've been trying to do so but to no avail. Any help will be appreciated. Thanks!
      • To post as a guest, your comment is unpublished.
        Faraz · 3 years ago
        Hi

        I am also looking for the same solution, plz help me too.

        I want to automatically BCC all my emails to my personal email address via VBA code which is working fine. But when I go to sent items BCC field is visible to me, I want to hide it from myself as well so that even it is not visible to me.
        Can anyone please help on this with VBA code. Thanks
        Currently I am using the following code:
        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
        ' #### USER OPTIONS ####
        ' address for Bcc -- must be SMTP address or resolvable
        ' to a name in the address book
        strBcc = "privateemail@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
        End Sub
      • To post as a guest, your comment is unpublished.
        Faraz · 3 years ago
        Hi

        I am also looking for the same solution

        I want to automatically BCC all my emails to my personal email address via VBA code which is working fine. But when I go to sent items BCC field is visible to me, I want to hide it from myself as well so that even it is not visible to me.
        Can anyone please help on this with VBA code. Thanks
        Currently I am using the following code:
        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
        ' #### USER OPTIONS ####
        ' address for Bcc -- must be SMTP address or resolvable
        ' to a name in the address book
        strBcc = "privateemail@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
        End Sub
  • To post as a guest, your comment is unpublished.
    Steviej · 5 years ago
    VBA worked as advertised. Thank you.
  • To post as a guest, your comment is unpublished.
    Karen · 5 years ago
    Worked fine with Outlook 2013 but came up with a compile error in 2007
  • To post as a guest, your comment is unpublished.
    Harry · 6 years ago
    The macros starts but do nothing in Outlook 2010: If I put Stop to line 13 it opens VBA window and lets me run macros step-by-step... but when macros finishes I see no any leters. Looks like it send letter before BCC added.
  • To post as a guest, your comment is unpublished.
    Leisha · 6 years ago
    hello,

    I did the instructions for outlook 2007 and it didn't work :/ any tips?
  • To post as a guest, your comment is unpublished.
    Chris · 6 years ago
    It works great but is there a way to do this with multiple bcc?
    • To post as a guest, your comment is unpublished.
      Rory · 4 years ago
      [quote name="Chris"]It works great but is there a way to do this with multiple bcc?[/quote]

      So, since it calls the method Item.Recipients.Add(strBcc) to add another recipient the program treats whatever string you provide as a single email address. The trick is simply to call the same method again in the same fashion for a second variable.

      E.g.
      strBcc = "email1@email.com"

      strBcc2 = "email2@email.com"

      Set objRecip = Item.Recipients.Add(strBcc)
      objRecip.Type = olBCC

      Set objRecip = Item.Recipients.Add(strBcc2)
      objRecip.Type = olBCC


      I'm no vba expert so not sure what the Set objRecip part does at all... but the above works for me.
      • To post as a guest, your comment is unpublished.
        Jeremy · 2 years ago
        I've tried your suggestion but it show error message "the operation failed. The messaging interfaces have returned an unknown error. If the problem persist, restart Outlook. Cannot resolve recipient.", any suggestion?
  • To post as a guest, your comment is unpublished.
    manjur · 6 years ago
    i take help from ur site
    thanks
  • To post as a guest, your comment is unpublished.
    Kitkat · 6 years ago
    Hi, this doesn't seem to work on Outlook 2013. Can you create another code for that version?

    Thanks!
    • To post as a guest, your comment is unpublished.
      siluvia zhou · 6 years ago
      Dear Kitkat,
      This code also works on Outlook 2013.
      After saving the code, please do as follows:
      1. Go to the [b]Developer[/b] tab, and click [b]Macro Security[/b].
      2. In the popping up [b]Trust Center[/b] dialog, select the [b]Enable all macros (not recommended; potentially dangerous code can run)[/b] option in the Macro Settings section. Then click [b]OK[/b].
      3. Now, close your Outlook 2013 application and then restart it, the code will work. :-)