2

I have VBA code to forward email to a specific account. It works except email being forwarded has the forwarder's email address.

How can I keep the original sender email address as the replyto after an email is forwarded?

Sub AutoForwardAllSentItems(Item As Outlook.MailItem)
    Dim strMsg As String
    Dim autoFwd  As Outlook.MailItem

    Set autoFwd = Item.Forward

    autoFwd.Recipients.Add "[email protected]"

    autoFwd.Send

    Set autoFwd = Nothing
End Sub

2 Answers 2

3

so there is no way? really? – Mike 7 hours ago

Riking is correct when he mentioned that Outlook will not let you modify the headers included in the email. I am guessing that he is refering to .SenderEmailAddress property. You cannot modify the .SenderEmailAddressas this property is readonly.

Having said that there is another property that you may like to use. .SentOnBehalfOfName More details here

Topic: SentOnBehalfOfName Property

Link: http://msdn.microsoft.com/en-us/library/aa171998%28v=office.11%29.aspx

Quote from the above link

Returns a String indicating the display name for the intended sender of the mail message. This property corresponds to the MAPI property PR_SENT_REPRESENTING_NAME. Read/write.

expression.SentOnBehalfOfName

expression Required. An expression that returns a MailItem object.

Also see this link

Topic: Automatically setting the ‘From’ address of a new Outlook message

Link: http://benchristian.wordpress.com/2005/12/18/automatically-setting-the-from-address-of-a-new-outlook-message/

Quote from the above link

Setting an alternate reply address is particularly useful if you are using a mail enabled public folder or distribution list for a group of users and would like the replies to messages that they send to go to the group smtp address instead of the sender’s mailbox.

HTH

2

Everything I've seen so far supports the conclusion that Outlook will not let you modify the headers included in the email.

Sorry. I'd suggest managing the forwards at the email provider, if that is an option for you.

1
  • + 1 Yup you cannot change the .SenderEmailAddress property as it is readonly. May 10, 2012 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.