automatically BCC in Outlook 2007
Have you ever wanted to automatically bcc all your outbound mail to a specific email address? I wanted to send a copy of ALL sent mail from Outlook at work to my Gmail address. You could try to do this via Outlook's Rules and Alerts, but there's no option to bcc...only cc. I'd prefer that all my work contacts not know my personal Gmail address, and it's not very professional. I also don't want to manually enter my Gmail address in the bcc field of every outgoing message... the solution? Visual Basic Scripting.
The steps (MS Outlook 2007):
- Open MS Outlook 2007
- Under the Tools menu, select Macro > Visual Basic Editor (or Alt+F11)
- In the left menu bar, expand Project1, Microsoft Outlook Session, and open ThisOutlookSession
- Enter copy & paste this code, making sure to substitute youremailaddress@domain.com with your real email address:
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 = "youremailaddress@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
Save the session, close the Visual Basic Editor, restart Outlook, and you're good to go! (make sure that you've allowed Outlook to run macros) You can verify that your emails are being cc'd by (1) checking your alternate email address or (2) looking at the bcc field of one of your messages in the Sent Items folder.
29 comments:
this iss super i had same problem with rules and alerts
Hi,
This is very great!
How can we adjust it to BCC only if the "subject includes a spcific string?
Many thanks,
Mina
how do i see the BCC field in my sent emails?
have followed above rules and copied code but doesn't seem to work. what is bit is green re ' #### USER OPTIONS ####' address for Bcc -- must be SMTP address or resolvable' to a name in the address book - Thanks
@Anonymous(1)- Open your Sent Items folder and then open a message which was bcc'd. In the header/info portion of the email (top left) you will see the bcc address under the "Bcc:" field. This should appear below the "To:" field and immediately above the Subject.
@Anonymous(2) - The green portion of the code is a comment. It doesn't affect the rest of the code, but it reminds users that the email address you enter (to replace the red text) must either be a normal SMTP resolvable email address or a name in your Address Book.
Dear Andrew,
It's a great script and work well.
However, I wonder if we would like to multiple
BCC: email address.
What can I do or edit the code ?
Thank a million..
Nont
This is awesome. One question: Can you tie it to a specific account? I have several accounts set up in my outlook, and I only want the auto bcc for two of them. Any help would be greatly appreciated!
@EricaB hmm not sure how to tie it to a single account. I've just played with global Outlook rules. You could try adding 'If Item.SenderEmailAddress = "YOUR@EMAIL.COM"' below line 'objRecip.Type = olBCC' and another 'End If' below the current two. May/may not work...
I've used this to Bcc our new CRM system and it works perfectly. Thanks you've just saved me a $100
If you want to send to two forwarding addresses, can this be done?
@Anon - Hmm, I'm not sure. Try substituting "youremailaddress@domain.com" with "address1@domain.com;address2@domain.com" Unfortunately I no longer use Outlook and cannot test this out.
Andrew,
Thank you, thank you, thank you for this wonderful macro!
Great..Thanks
For the last few years have been doing this manually and was a pain.
never made a macro. so this was perfect and it works!
Cheers
It does not work with my Outlook 2007 SP2. :(
@ertpresso - Why not/what happens?
Doesn't work on my Outlook 2007 either. The mail sends but when I check the Sent Items there is no Bcc in the mail item and it does not come through to the email address I specified, (which is in my address book). If it matters I run a 32 bit version of Win 7.
I want Hide BCC name when i open sent item mail its showing me. I have to take it confidentially. please help me,
Thank in Advance
Hi,
I've noticed this script does not work when I am replying to or forwarding a message that has been filed to a folder.
Thought you would want to know. I'm going to try to figure it out.
Thanks.
Rich
Thank you very much for sharing this, it helps me a lot !!!
Thanks! This is just what I needed.
Amazing thanks!!!
Thank you!! It is very helpful..
thanks
it is working :)
I signed in just to say thank you for this script.
Thank you very much :)
Hello Andrew,
It's very helpful.
Thank you very much!
Julius
It's working properlly.
Thank you very much!
This has worked for decades... since two weeks ago it's stopped working. I'm not sure why... anyone else with the same issue?
Thanks
Post a Comment