Pages

Thursday, November 19, 2015

BCC all sent mails in Outlook 2010 to your another email

In Outlook 2010, Microsoft removed BCC option from Message Rule. So we can't create a rule which can sent all outgoing mails copy to an other account as BCC.

We can do this through a VBA Code which will automatically sent BCC. Follow the steps to achieve this.

1) Go to the Developer tab and click Visual Basic.

2) On the left, expand Project1 (VbaProject.OTM to reveal Microsoft Outlook Objects. Expand Microsoft Outlook Objects and then double-click ThisOutlookSession.

3) In the code editor window, choose Application from the drop-down menu in the top-left.

4) In the top-left drop-down menu, choose ItemSend.

5) Now, copy and paste the following between these two lines.  After “Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)” and before “End Sub.”

Dim oRcp As Recipient
Dim sMsg As String
Dim iRes As Integer
Dim sBcc As String
On Error Resume Next

sBcc = "EmailAddress@domain.com" 'Replace EmailAddress@domain.com with your email address 
'This is BCC email address

Set oRcp = Item.Recipients.Add(sBcc)
oRcp.Type = olBCC

If Not oRcp.Resolve Then

   sMsg = "Could not resolve the Bcc recipient. Do you want still to send the message?"
   iRes = MsgBox(sMsg, vbYesNo + vbDefaultButton1,"Could Not Resolve Bcc Recipient")

   If iRes = vbNo Then
     Cancel = True
   End If

End If

Set oRcp = Nothing
Note : Find sBcc=”EmailAddress@domain.com” and replace the email address you’d like to BCC

Save and Close the Visual Basic Editor and return to Outlook.

When you send messages from Outlook 2010, it will be automatically add BCC recipient you chose in the Visual Basic editor. You don’t have to type in the BCC field, nor will you even see it entered into the BCC field since the Visual Basic Script do it after you hit send. 

No comments:

Post a Comment