Saturday, September 04, 2010

Blog

23

By using the built-in rules in Outlook you can automatically CC an email address on outgoing messages (and even specify additional criteria like key words in subject lines, etc.), but there is no option to use BCC. This article will show how to modify Outlook to automatically BCC an email address on all outgoing messages.

There are probably several reasons in which you would want to automatically BCC and email address on all outgoing messages (archival purposes being one of them). In this instance, I needed a solution to perform an automatic BCC to a system email address for a pilot of the Trampoline Systems SONAR product. SONAR can consume your daily email traffic and use it to create connections to people and topics (sort of like an automatic FaceBook application. After some hunting around the internets, I happened upon this solution, which I'll explain further here.

Note: This method was tested on Outlook 2007, but should work on Outlook 2003 or later.

  • In Outlook, go to the Tools menu, Macro option, and select Visual Basic Editor.
  • In the Project listing (upper left box on the screen), expand Project1 (VbaProject.OTM) and within that expand Microsoft Office Outlook Objects.
  • Double-click the ThisOutlookSession project to open it. In most cases this is empty, unless you've already been modifying your copy of Outlook with macros and such.
  • In the code window that opens up, choose Application from the left most drop-down list box, and ItemSend from the other (it might automatically be selected for you).
  • You should be presented with something like this:
  • Copy and paste the following code after the Private Sub line and before the End Sub line:
    Visual Basic
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    
        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
    
    Note: Be sure to replace SomeEmailAddress@domain.com with your intended email address. To test your changes you may wish to temporarily it to a secondary email address (like a Gmail account), to make sure all is working correctly.
  • When you are done, it should look like this:

    You'll note that I have the intended email address set to the system account necessary for the SONAR product.
  • Save the VbaProject.OTM file, close the Visual Basic editor, return to Outlook, and start sending messages.

This should work for new messages as well as replies and forwarded messages. If you have any questions or comments, please comment on them here.

Posted in: Windows

Post Rating

Comments

Alex
# Alex
Thursday, May 07, 2009 1:13 AM
Don't work with Outlook 2003 :'(
Dáire
# Dáire
Wednesday, May 13, 2009 3:49 PM
Some good advice there, was wondering if there is a way to specify it to a particular email account if multiple accounts exist in Outlook?

Thanks,

Dáire
Ben
# Ben
Thursday, June 11, 2009 7:07 AM
Hi Michael,

This is exactly what I'm looking for, thanks!

However, I can't seem to get it to work...
I have followed your instructions exactly, here is a screenshot of the code:
http://www.georgesmusic.com/images/auto-bcc.jpg

Any ideas?

Also, what if I have Outlook receiving/sending from multiple accounts and I just want this function to BCC for one of them?

Thanks so much!

Ben
Shawn
# Shawn
Wednesday, July 01, 2009 9:34 AM
Any way to modify this so that a BCC is sent only when a message is sent to a specific recipient?
aaron
# aaron
Monday, August 03, 2009 1:22 PM
I have multiple e-mail accounts set up. Is there a way to make this run through the "Outlook Rules Wizard" so that this is only active when sending messages out on certian accounts?
Nick
# Nick
Wednesday, August 05, 2009 7:33 AM
Hi Thanks for the info. It worked out for the first time then doesnt work anymore for the next ones. Also it makes my .pst unaccessible. It is a clean install of office 2003 and win xp. Please hlep
Bruce
# Bruce
Monday, November 23, 2009 10:57 AM
I have set this up, but I still do not receive the bcc. Is there anything I have to turn on in my Outlook?

thanks
Bruce
# Bruce
Monday, November 23, 2009 12:38 PM
It doesn't seem to work for me. I made sure VBA was installed in the Microsoft options. Any thoughts?
Mina
# Mina
Friday, December 04, 2009 9:15 AM
This is great! Many thanks!

How can we have messages BCCed only if the "Subject" includes a specific string?

Thanks in advance!
Shula Cohen
# Shula Cohen
Tuesday, January 05, 2010 7:51 AM
Seems like it didn't survive a reboot of the PC. The file is still there, but the Bcc is not done.
Mark Byrum
Tuesday, January 05, 2010 9:12 AM
Excellent! Did it myself and did not have to purchase and download a program to do this for me for $29.95. It is a simple fix which Microsoft SHOULD HAVE INCLUDED in the Outlook options in the first place. Good Job!
Mark
Prince
# Prince
Thursday, January 14, 2010 10:29 AM
Thanks for the help. I was wondering how to change the coding so that it only applies to a specific account (email address). I am using outlook 2003.
ulf
# ulf
Tuesday, January 19, 2010 12:43 PM
hi Michael,

I tried your code but I dont seem to be able to get this to work i.e. the BCC field is never populated :( Any ideas?

reg//ulf
Grant Millar
# Grant Millar
Wednesday, January 20, 2010 12:28 AM
Excellent very easy, works a treat, thank you
Yu
# Yu
Wednesday, February 03, 2010 6:05 AM
I followed the steps and sent email, but the bcc doesn't work. Please help.
Vlady
# Vlady
Friday, February 12, 2010 12:13 PM
It did not work in my Windows 7 Outlook
Charmaine
# Charmaine
Tuesday, March 16, 2010 12:29 PM
Hey there,

This is great informtion - thank you! Do you have any idea how to still send all received and sent messages to an additional participant, but the email address should not display in the bcc field of the sent item?

Thanks!
Charmaine
Gary Sipos
# Gary Sipos
Wednesday, March 24, 2010 1:02 PM
If a person has more than one email account within Outlook, and if we want all the email messages to be BCC'ed from one email account and no email messages BCC'ed from the second email account, does the above code accommodate for this?

If not, do you have code that could accommodate for this?

Thanks for your kind consideration

Gary
joy
# joy
Saturday, April 10, 2010 5:29 PM
Hey, thanks for the instructions. I set this up and it worked once, but then when I closed and re-opened outlook, it stopped working. Any suggestions?
Okky
# Okky
Saturday, April 10, 2010 8:11 PM
Hi Mike,

Nice tips. It actually worked for my Outlook 2007 yesterday.
But after I shutdown my laptop and turn it on again, it stops working.
Do you have any idea what's going on?
I tried to put false email recipient on the strBcc, but the MsgBox won't show up.

Thanks in advance.
slakos
# slakos
Friday, April 16, 2010 6:29 AM
Thank you.
GG
# GG
Wednesday, April 28, 2010 3:25 AM
Hello,

Thus worked for me only once, since then my outgoing msgs arent going to the bcc address. Please help
ab
# ab
Wednesday, May 12, 2010 5:48 AM
It works perfectly. Thanks a lot.
Jeffrey Rodman
Monday, May 24, 2010 6:41 PM
Worked perfectly!

Awesome... thank you so much.

The only thing I was finding was add on software for a fee until I found your blog.
H
# H
Tuesday, June 08, 2010 4:05 AM
Hi, Not sure if your site is still updated but thought I would try a comment! :¬)

Thanks for your tutorial.

I've just tried your Outlook/BCC hack and all works fine until I restart Outlook. The code is still there but it no longer takes affect?!

Any ideas?
Thanks again...
furman
Friday, July 02, 2010 2:46 AM
Brilliant, done in minutes thanks a lot.
Majed
Monday, July 05, 2010 1:13 AM
It doesn't seem to work !
Rudy
# Rudy
Wednesday, July 21, 2010 6:41 AM
Adding an Automatic BCC to Outlook stopped working for me Jan 2010. Did an Outlook update stop this function?
Michael Kizer
Wednesday, July 21, 2010 12:24 PM
Note:
It has been brought to my attention that this may no longer work for unknown reasons (possibly a Microsoft security patch). I've confirmed that it no longer functions on my computer (WinXP with Outlook 2007).

Let me know via these comments if you have success or failure with this code.
Thanks.
MJ
# MJ
Wednesday, July 28, 2010 6:27 PM
This was working for me until yesterday, but I found this very similar code on a German website and it seems to be working.

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

Address = "abc@domain.com"

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


http://www.vboffice.net/sample.html?mnu=2%E2%8C%A9=en&smp=77&cmd=showitem

Anyone who knows more about VBA see any reason not to use this?
Zoe
# Zoe
Wednesday, August 04, 2010 8:17 PM
Totally Wicked, well done. Thanks Heaps!

Took 3 min to install and another 3 to test, works like a dream. Exactly what i needed.

5 stars


Zoe
Jordan
# Jordan
Friday, August 06, 2010 11:26 AM
I can't seem to get this to work at all. Does anyone have a method that works with Windows 7 and Outlook 2007? I really need this for CRM tracking.

Thanks
Chris
# Chris
Tuesday, August 10, 2010 8:18 AM
For those having problems getting this to work:

Check Tools/Trust Center to see whether security is set not to execute macros.
jon silve
# jon silve
Thursday, August 12, 2010 8:35 AM
works fine, but i want it to apply to only 1 of 2 accounts in my outlook 2007.

can the code be adjusted to look for an account name or similar before jumping in to action?

thanks
Bob
# Bob
Tuesday, August 24, 2010 6:47 AM
Like a lot of other comments it worked yesterday but no longer works after rebooting ... although the code is still there in outlook.

Did anyone figure out how to fix?

thanks
mkizer
# mkizer
Tuesday, August 24, 2010 10:19 AM
I've been unable to get either my original code or the alternate code posted in the comments to work in Outlook 2007. My guess is that MS has blocked some of this functionality via a security patch to prevent malicious use.

If anyone dives into this issue and discovers more, post it here. Thanks!

Post Comment

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above: