Autoforward Rule that modifies the original

B

bbowden

I am trying to forward messages to a specific email address and depending on
the content of the original message, tag the forwarded message with specific
content.

I understand how to set up the auto forward rule but I can't find any way to
modify the content of the autoforwarded message.

I'm thinking along the lines of the "reply using a specific template" option
of the Rules Wizard but instead of a reply to the sending address, a forward
to a completely different address.

Thanks,
 
S

Sue Mosher [MVP-Outlook]

A simple rule can't do that. Are you up to writing VBA code?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
B

bbowden

Absolutely. Matter of fact, I was just looking at your web site and I was
thinking that was probably the way I was going to have to go.
 
B

bbowden

Any suggestions on directions to go?

Sue Mosher said:
A simple rule can't do that. Are you up to writing VBA code?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

A "run a script" rule action actually uses not an external script but a VBA procedure with a MailItem or MeetingItem as its parameter. That item is processed by the code:


Sub RunAScriptRuleRoutine(MyMail As MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim msg As Outlook.MailItem
Dim fwd as Outlook.MailItem

strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msg = olNS.GetItemFromID(strID)
' do stuff with msg, e.g.
Set fwd = msg.Forward
With fwd
.To = "(e-mail address removed)"
.Subject = fwd.Subject & " and some tag"
' etc.
' work your magic on the fwd forward message here
.Display
End WIth

Set msg = Nothing
Set olNS = Nothing
End Sub


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
B

bbowden

Sue,
Thanks for the excellent answer!



Sue Mosher said:
A "run a script" rule action actually uses not an external script but a VBA procedure with a MailItem or MeetingItem as its parameter. That item is processed by the code:


Sub RunAScriptRuleRoutine(MyMail As MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim msg As Outlook.MailItem
Dim fwd as Outlook.MailItem

strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msg = olNS.GetItemFromID(strID)
' do stuff with msg, e.g.
Set fwd = msg.Forward
With fwd
.To = "(e-mail address removed)"
.Subject = fwd.Subject & " and some tag"
' etc.
' work your magic on the fwd forward message here
.Display
End WIth

Set msg = Nothing
Set olNS = Nothing
End Sub


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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