How to receive mails on behalf of when sent to group mail?


Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server 2013
I receive mails from a group mail sender - ( is in the From field, it's also in the contact list as Pi_team). In the message header there are some specific words I can search for -> ex: From: Mike "
Is it possible to set up a rule to see "Mike on behalf of Pi_team" in the From field of these incoming mails?

What should I set up to make these mails come as sent on behalf of?

Thanks in advance!


Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You can use words in the header and search for the phrase as it appears in the header but you can't change what you see in the From field using straight VBA. You can use Redemption (What is Redemption)

Sample code using redemption is below - you can look at the values using MFCMAPI to see what outlook has for the sender name and representing name and see if both need changed or if you can use one value in the other field.

After installing redemption, you can run this code and it will change the name to whatever you want. You'll need additional code to grab the name from the header.
Sub changename()
Dim rSession As Redemption.RDOSession
    Dim rMail As Redemption.RDOMail
    Dim ID As String
    Const PR_SENDER_NAME = &HC1A001E
    Set rSession = CreateObject("Redemption.RDOSession")
    ID = Application.ActiveExplorer.Selection.Item(1).EntryID
    Set rMail = rSession.GetMessageFromID(ID, Application.Session.DefaultStore.StoreID)
    rMail.Fields(PR_SENDER_NAME) = "New Name"
    rMail.Fields(PR_SENT_REPRESENTING_NAME) = "New Name"
End Sub
code samples to get the value from the header or other fields:
Get Outlook's Internet Headers using VBA
Read MAPI properties not exposed in Outlook's Object Model