Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how do I get this script to run?

7 views
Skip to first unread message

voip...@mytrashmail.com

unread,
Aug 22, 2005, 4:32:11 PM8/22/05
to
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 = "som...@somewhere.dom"
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 = "som...@somewhere.dom"

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

voip...@mytrashmail.com

unread,
Aug 22, 2005, 6:50:30 PM8/22/05
to
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 :)

voip...@mytrashmail.com

unread,
Aug 23, 2005, 1:10:50 AM8/23/05
to
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.

0 new messages