VBA code not starting on some Outlook 2003 clients, does on others.
This is the code that I am trying to run
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
Dim objMe As Recipient
If test(Item) Then
Set objMe = Item.Recipients.Add("insert bcc recipient here")
objMe.Type = olBCC
objMe.Resolve
Set objMe = Nothing
End If
End Sub
Function test(objMail As Outlook.MailItem) As Boolean
Dim objRecip As Outlook.Recipient
For Each objRecip In objMail.Recipients
'when sending email to X carbon copy Y...Enter X's email address here :
If objRecip = "recipient address here" Then
test = True
End If
Next
End Function
It runs fine on some, doesn't launch on others. Going to see if it is
just the ItemSend event or vba code in general
|