Wednesday, 20 May 2015

BCC rule in outlook 2010

How to Automatically BCC in Outlook 2010

Outlook 2010
Article summary:
  • A step-by-step screenshot tutorial for automatically BCCing an email address for all outgoing Outlook messages.
  • From Outlook 2007 to Outlook 2010, Microsoft removed the BCC field. We’ll show you how to add the BCC field back in.
  • To auto BCC in Outlook, we’ll need to show the developer tab and add a script.
  • See the comments for how to set up an automatic BCC for messages sent only from a particular email address (for multiple Outlook accounts—thanks Nathan!)
Perhaps it was due to one too many passive aggressive intra-office stealth BCCs (Blind Carbon Copy), but for some reason, Microsoft decided to seriously roll back access to BCCs in Office 2010. For one, the new message dialog doesn’t even have a BCC field. But you also can’t set up Outlook 2010 rules to automatically BCC someone (although you can set up a rule to automatically CC a message). For my purposes, this is kind of a pain. I am a Gmail/Outlook hybrid user (I have about three different email addresses, each for a different purpose) and I like to keep all of my messages archived in my main Gmail account for easy reference. So, what I wanted was a way to forward all of my sent messages to my Gmail account (I already have all incoming messages forwarded there by a sever-side rule).  Easier said than done but I think I’ve figured out the easiest way.
It turns out that there are three things that need to be done to unlock the full potential of BCC in Outlook 2010:
  1. Show the BCC Field in the New Email window.
  2. Reveal the Developer ribbon.
  3. Add some custom Visual Basic code.
It’s not as difficult as it seems. But let’s move through them from easiest to hardest.
(Note: You can also buy third-party Add-Ins for Outlook 2010 that do this—but I’d recommend this method. It’s free.)
If you are having an issue where this stops working after you restart your computer, please read the note about macro security at the end of this article.

Show the BCC Field in New Emails in Outlook 2010

Step 1

Launch Outlook 2010.

Step 2

Click the New Email button. In the message composition window, click the Optionstab.
Reveal BCC in Outlook 2010

Step 3

Click the BCC button.  This reveals the BCC field. Henceforth, you shall have access to the BCC field in all future Outlook 2010 emails. If you get tired of the extra space it takes up, you can just click it again to be rid of it.
Reveal BCC in Outlook 2010
Now, you can use the BCC field for one-offs. But what if you wanted to automatically BCC yourself (or someone else) on every outgoing message? To do this, follow the steps below.

Display the Developer Ribbon

I’m basing this how-to on a great bit of custom Visual Basic code written by Michael Kizer. Michael wrote this VBA snippet for Outlook 2007, but it works for Outlook 2010. The only problem: it’s a bit tough to find Visual Basic Editor in Outlook 2010. It’s hiding in the Developer ribbon, which, by default, is hidden from view. Here’s how to enable it:

Step 1

Launch Outlook 2010.

Step 2

Click the File tab and choose Options.
Reveal Developer Tab in Outlook 2010

Step 3

Click Customize Ribbon on the left-hand panel. Now, in the list on the far right, make sure Developer is checked. Click OK.
Reveal Developer Tab in Outlook 2010

Step 4

The Developer tab will now be revealed in your Outlook 2010 ribbon.
Reveal Developer Tab in Outlook 2010

Automatically BCC Outgoing Messages in Outlook 2010

Now, it’s time to add the code that Mr. Kizer put together.

Step 1

Go to the Developer tab and click Visual Basic.

Step 2

On the left, expand Project1 (VbaProject.OTM to reveal Microsoft Outlook ObjectsExpand Microsoft Outlook Objects and then double-clickThisOutlookSession.
Auto BCC with Outlook 2010

Step 3

In the code editor window, choose Application from the drop-down menu in the top-left.
Auto BCC with Outlook 2010

Step 4

In the top-left drop-down menu, choose ItemSend.
Auto BCC with Outlook 2010

Step 5

Position your cursor after “Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)” and before “End Sub.” Now, copy and paste the following between those two lines.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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

Step 6

Look for the line that reads: strBcc=”SomeEmailAddress@domain.com” and replace the email address you’d like to BCC for SomeEmailAddress@domain.com. For example, swap it out for mysecondaryemail@gmail.com origbrother@supervisor.com.
Auto BCC with Outlook 2010

Step 7

Don’t forget to save the changes. Close the Visual Basic Editor and return to Outlook.
Auto BCC to Outlook 2010
Now, when you send messages from Outlook 2010, they’ll be automatically BCC’d to the recipient you chose in the Visual Basic editor. You don’t have to type their name in the BCC field, nor will you even see it entered into the BCC field, since the Visual Basic script kicks in after you hit send. (A handy tip for any cyber spies).
Auto BCC to Outlook 2010
Filtering BCC Gmail Messages
And there you have it.

Filtering BCC’d Gmail Messages

One last thing to note: if you’ll be using this to build a Gmail archive, I recommend using a customized Gmail address with something like +bcc appended to it. However, since the address won’t show up in the to: field, you can’t filter it out like normal. So, instead you’ll have to use the “deliveredto:” string in Gmail. For example, I’d use “deliveredto: username+bcc@gmail.com” and then set up a rule that automatically archives these messages and marks them as read.
Filtering BCC Gmail Messages

A Note About Macro Security

Note: This section may help those who find that the macro stops working the next day or after a system restart.
In order to get this to work, you may need to alter your macro security settings. Either way, you’ll probably get a nagging message like this when Outlook 2010 launches:
SNAGHTML433faf
As you can see, that just refers to the script that you put into ThisOutlookSession—it doesn’t mean you have a virus. You can click Enable Macros to proceed with your Auto BCC script intact.
If you want to skip this step, you can change your Macro Security settings by going to the Developer tab and clicking Macro Security.
Outlook 2010 Macro Settings
Under “Macro Settings,” you’ll have a few different options:
Outlook 2010 Macro Settings