Re: Change subject on forwarded email



Thanks Sue, that does work as expected. However, forwarding a message
adds additional text into the body (i.e. Original message sender etc).
I had another look at the actions available in rules and one of them is
redirect the message which would probably work perfectly, however that
appears to take place on the Exchange server only, the MailItem object
doesn't have a Redirect method available.

The only other thing I can think of is to strip the first 18 lines from
the message body (my signature and the additional lines added with
original sender name, etc) on the forwarded message before invoking the
Send method, which will effectively leave me with the original message
body. It's a horrible ugly hack, can you think of a better way though?

Graeme

Sue Mosher [MVP-Outlook] wrote:
You can use a rule with a "run a script" rule action, which takes 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

strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set msg = olNS.GetItemFromID(strID)
' do stuff with msg, e.g.
Set fwd = msg.Forward
fwd.Subject = "new subject"
fwd.To = "someoone@xxxxxxxxxxxxx"
fwd.Send

Set msg = Nothing
Set olNS = Nothing
End Sub

See http://www.outlookcode.com/d/code/zaphtml.htm#ol2002 for another example.


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Graeme Donaldson" <graeme.donaldson@xxxxxxxxx> wrote in message news:1152773587.382977.226680@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi

I need to forward mails from a specific sender to another address,
maintaining the message body but changing the subject. I am not too
familiar with the VBA object model for Outlook as most of the VBA I
work with is in Excel, so I'm not sure where to start.

Incidentally, I thought that there may be a rule I could use that would
allow this but it seems to not be the case.

I am using Outlook 2003.

Can anyone offer some pointers?

Thanks,
Graeme


.



Relevant Pages

  • Re: Outlook 2003 email listing ALL previous posts on topic, etc.
    ... from Outlook Express to Outlook by my iPhone, ... Ask the sender not to quote the original e-mail they received from you when they reply back. ... The inclusion of the original message is not under your control for e-mails that you receive. ...
    (microsoft.public.outlook)
  • Delay sending function OL 2003/Ex 2003
    ... I am trying to track down exactly what the process is when a sender ... outlook 2003 in an exchange 2003 environment. ... not set a 'do not deliver before' time on the original message. ...
    (microsoft.public.exchange.admin)
  • Re: Outlook
    ... Please visit the experts in the Microsoft Outlook Newsgroup: ... | Actions/ Resend Message, edits the message and clicks Send. ... | does not get the edited text, he gets the original message. ... Outlook 2000 sender is trying to resend message and gets "You ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: suffix .dat
    ... The only .dat files I've seen are winmail.dat attachments in email. ... These are sent from Outlook Windows whenever the sender sends mail in RTF ...
    (microsoft.public.mac.office.word)
  • Re: suffix .dat
    ... The only .dat files I've seen are winmail.dat attachments in email. ... These are sent from Outlook Windows whenever the sender sends mail in RTF ...
    (microsoft.public.word.docmanagement)