We have a Outlook VBA that EE helped us some time ago where it places BCC email automatically when creating, replying and forwarding an email. Some time back the computer failed and the VBAs were not restored to the Outlook. We just finish restoring the VBA to the ThisOutlookSession but it doesn't work and can't find the documentation. We want to every time we create, reply or forward and email, the BCC field is filed automatically based on this script. Please advice what are we missing (below the VBA).
Private WithEvents m_Inspectors As Outlook.Inspectors
Private Sub Application_Startup()
Set m_Inspectors = Application.Inspectors
Private Sub m_Inspectors_NewInspector(ByVal Inspector As Inspector)
Dim objRecip As Recipient
Dim strMsg As String
Dim strBCC As String
If TypeName(Inspector.CurrentItem) = "MailItem" Then
If Inspector.CurrentItem.EntryID = "" Then
' #### USER OPTIONS ####
' address for Bcc -- must be SMTP address or resolvable
' to a name in the address book
strBCC = "firstname.lastname@example.org"
Set objRecip = Inspector.CurrentItem.Recipients.Add(strBCC)
objRecip.Type = olBCC
If Not objRecip.Resolve Then
strMsg = "Could not resolve the Bcc recipient."
MsgBox strMsg, vbInformation, "Could Not Resolve Bcc Recipient"
Set objRecip = Nothing