none
How to display other text instead of sendername? RRS feed

  • Question

  • Hello,

    can I change the displayed sendername? I want to change it in the mail window.

    Explanation: I'm getting mails from a person that has a lot of whitespaces in his sender name. I already wrote a function to remove those whitespaces.
    I know, I can't change the sender name. But I hope I can display the sender name without all the whitespaces.

    I changed the MailItem.SentOnBehalfOfName value and in Outlook explorer I can see the changes. But above the mail text in mail window there is still the name with all the whitespaces.



    Thank you very much.
    Tuesday, October 29, 2019 7:34 AM

All replies

  • You need to modify the PR_SENDER_NAME MAPI property (DASL name http://schemas.microsoft.com/mapi/proptag/0x0C1A001F). It corresponds to MailItem.SenderName in the Outlook Object Model, but it is read-only. MailItem.PropertyAccessor.SetProperty will not let you modify it - you can do that only using Extended MAPI (C++ or Delphi) or Redemption.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, October 29, 2019 2:52 PM