V
voip1234
At slipstick I found this script to automatically BCC to a specific
address every
single email I send.
I pressedn Alt-F11 and then pasted the code in the ThisOutlookSession
then I changed the line
strBcc = "(e-mail address removed)"
to my email address.
Finally I pressed the save button on the toolbar and quit VB editor.
It worked once...then I shutdown the machine for the night.
Today I reboot and even though the code is still there, it does
not send the BCC. I tried to put a msgbox in the code to see
if it is even running, but it looks like its not.
Any idea what I should do? or how i can get this to run?
thanks,
-guillermo
PS.- I use Outlook 2003 with all available updates on XP also with all
available updates.
PS2.-the script is:
-----------------------------------
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
' #### USER OPTIONS ####
' address for Bcc -- must be SMTP address or resolvable
' to a name in the address book
strBcc = "(e-mail address removed)"
On Error Resume Next
Set objRecip = Item.Recipients.Add(strBcc)
' handle case of user canceling Outlook security dialog
If Err = 287 Then
strMsg = "Could not add a Bcc recipient " & _
"because the user said No to the security prompt." & _
" Do you want still to send the message?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"Security Prompt Cancelled")
If res = vbNo Then
Cancel = True
Else
objRecip.Delete
End If
Err.Clear
Else
objRecip.Type = olBCC
objRecip.Resolve
If Not objRecip.Resolved 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
End If
Set objRecip = Nothing
End Sub
address every
single email I send.
I pressedn Alt-F11 and then pasted the code in the ThisOutlookSession
then I changed the line
strBcc = "(e-mail address removed)"
to my email address.
Finally I pressed the save button on the toolbar and quit VB editor.
It worked once...then I shutdown the machine for the night.
Today I reboot and even though the code is still there, it does
not send the BCC. I tried to put a msgbox in the code to see
if it is even running, but it looks like its not.
Any idea what I should do? or how i can get this to run?
thanks,
-guillermo
PS.- I use Outlook 2003 with all available updates on XP also with all
available updates.
PS2.-the script is:
-----------------------------------
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
' #### USER OPTIONS ####
' address for Bcc -- must be SMTP address or resolvable
' to a name in the address book
strBcc = "(e-mail address removed)"
On Error Resume Next
Set objRecip = Item.Recipients.Add(strBcc)
' handle case of user canceling Outlook security dialog
If Err = 287 Then
strMsg = "Could not add a Bcc recipient " & _
"because the user said No to the security prompt." & _
" Do you want still to send the message?"
res = MsgBox(strMsg, vbYesNo + vbDefaultButton1, _
"Security Prompt Cancelled")
If res = vbNo Then
Cancel = True
Else
objRecip.Delete
End If
Err.Clear
Else
objRecip.Type = olBCC
objRecip.Resolve
If Not objRecip.Resolved 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
End If
Set objRecip = Nothing
End Sub