Thread
:
"run a script" rule won't fire macro
View Single Post
#
2
October 17th 06, 05:49 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
Posts: 1,885
"run a script" rule won't fire macro
Am 16 Oct 2006 11:57:03 -0700 schrieb
:
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
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.VBOffice.net
--
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 = "
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
Michael Bauer [MVP - Outlook]
View Public Profile
View message headers
Find all posts by Michael Bauer [MVP - Outlook]
Find all threads started by Michael Bauer [MVP - Outlook]
Ads