how do I get this script to run?

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
 
V

voip1234

by the way...i have already tried the macro security options...and the
IE security options too....still no luck.
I found a commercial plugin that does this same thing and works, but
its 25 bucks...i need to try to get this working before I resort to
paying :)
 
V

voip1234

ok, out of the blue outlook started asking me if I wanted to enable
macros because "thisoulooksession" has a macro....i said yes and it
started working again...
can somebody explain what defines whether the macro will run or not?
I havent changed anything since this afternoon when this did not work.
thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top