how to auto bcc yourself in outlook

1
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'For details on adding this VBA script into outlook please see this URL 'http://www.groovypost.com/howto/microsoft/how-to-automatically-bcc-in-outlook-2010/ ‘Code: AutoBCC version 1.01 Dim objRecip As Recipient Dim strMsg As String Dim myString 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 'Use this string if you want to bcc a copy to the email account that you are sending from 'Well, some of us have multiple accounts in the outlook client 'This one behaves like ThunderBird bcc setup at the account set up screen. myString = Item.SenderEmailAddress 'Use this string if you want to ALWAYS only bcc a specific address 'strBcc = "[email protected]" strBcc = myString Set objRecip = Item.Recipients.Add(strBcc) objRecip.Type = olBCC If Not objRecip.Resolve Then strMsg = "Could not resolve the Bcc recipient. " & myString & _ "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

Upload: chin-kp-

Post on 22-Apr-2015

1.714 views

Category:

Technology


9 download

DESCRIPTION

This is a simple way to automatically bcc (not cc) yourself in outlook in 2 specific scenarios.Scenario 1: bcc a specific email address. Scenario 2: bcc the email account that you are using (this useful for those of us who multiple accounts set-up in outlook). Credit: http://www.groovypost.com/howto/microsoft/how-to-automatically-bcc-in-outlook-2010/

TRANSCRIPT

Page 1: How to auto bcc yourself in outlook

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) 'For details on adding this VBA script into outlook please see this URL 'http://www.groovypost.com/howto/microsoft/how-to-automatically-bcc-in-outlook-2010/ ‘Code: AutoBCC version 1.01 Dim objRecip As Recipient Dim strMsg As String Dim myString 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 'Use this string if you want to bcc a copy to the email account that you are sending from 'Well, some of us have multiple accounts in the outlook client 'This one behaves like ThunderBird bcc setup at the account set up screen. myString = Item.SenderEmailAddress 'Use this string if you want to ALWAYS only bcc a specific address 'strBcc = "[email protected]" strBcc = myString Set objRecip = Item.Recipients.Add(strBcc) objRecip.Type = olBCC If Not objRecip.Resolve Then strMsg = "Could not resolve the Bcc recipient. " & myString & _ "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