Re: Change subject on forwarded email
- From: "Sue Mosher [MVP-Outlook]" <suemvp@xxxxxxxxxxxxxxx>
- Date: Thu, 13 Jul 2006 10:47:41 -0400
You could attach the item to a new message rather than forwarding it. Or, create a new message and put the body of the incoming message into it. (Don't know what you have in mind for the recipient information in that case, though.)
--
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:1152800121.515130.119820@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
.
"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
- Follow-Ups:
- Re: Change subject on forwarded email
- From: Graeme Donaldson
- Re: Change subject on forwarded email
- References:
- Change subject on forwarded email
- From: Graeme Donaldson
- Re: Change subject on forwarded email
- From: Sue Mosher [MVP-Outlook]
- Re: Change subject on forwarded email
- From: Graeme Donaldson
- Change subject on forwarded email
- Prev by Date: Re: Change subject on forwarded email
- Next by Date: Re: Change subject on forwarded email
- Previous by thread: Re: Change subject on forwarded email
- Next by thread: Re: Change subject on forwarded email
- Index(es):
Relevant Pages
|
Loading