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
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