"run a script" rule won't fire macro

S

sugargenius

I want to setup a rule/macro that will forward messages to my mobile
phone based on sender's address. Hopefully, I can create an "Important
Clients" distribution list and use that as the basis for the rule.

So far I did this:
Tools->Macro Security-
Select Low
Launch VBA Editor
Tools->References
Select Redemption Outlook Library
Insert Module
Added new sub
Public Sub ForwardMsgNoSave(oMailItem As Outlook.MailItem)
Dim objSafeMailItem As Redemption.SafeMailItem
Dim objFwdMsg As Outlook.MailItem

Set objFwdMsg = oMailItem.Forward
With objFwdMsg
.To = "(e-mail address removed)"
End With

Set objSafeMailItem = CreateObject("Redemption.SafeMailItem")
objSafeMailItem.Item = objFwdMsg
objSafeMailItem.Send
End Sub

create a blank rule
Apply this rule after message arrives
Select conditions (selected none)
"This rule will be applied to every message you receive. Is this
correct?"
Click yes
Select actions
Select "run a script"
Select "Project1.ForwardMsgNoSave"

Alt-F11
Set breakpoint on
Set objFwdMsg = oMailItem.Forward

Send myself a test message and nothing happens

What am I doing wrong?

Thanks
Woody
 
M

Michael Bauer [MVP - Outlook]

Am 16 Oct 2006 11:57:03 -0700 schrieb (e-mail address removed):

Please close Outlook and restart it.

Additionally, you must always clean up the Safe*Item objects yourself at the
end:

Set objSafeMailItem.Item=Nothing
Set objSafeMailItem=Nothing
 
W

Woody

Am 16 Oct 2006 11:57:03 -0700 schrieb (e-mail address removed):

Please close Outlook and restart it.

Additionally, you must always clean up the Safe*Item objects yourself
at the end:

Set objSafeMailItem.Item=Nothing
Set objSafeMailItem=Nothing

Thanks. Re-starting outlook did the trick. I wonder why it doesn't have a
warning like, "You must restart Outlook for these changes to take effect."
 
M

Michael Bauer [MVP - Outlook]

Am Tue, 17 Oct 2006 12:37:46 GMT schrieb Woody:

Why? The warnings are right here in the group :)
 

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