Returning "SenderName" as [email protected] instead of display name

  • Thread starter Thread starter Bert Geenen
  • Start date Start date
B

Bert Geenen

I am reworking some example code of Microsoft that allows me to select
multiple messages, have them added to the Junk Senders List and delete
them.
My problem is: objMailItem.SenderName returns the DISPLAY NAME of the
sender, where I am interested in adding the Internet address (e.g.
(e-mail address removed)) to the Junk Senders List.
Which property or method shoud I use that returns me this information
(if available at all...).

Best regards,

Bert Geenen (Belgium)

ps. the code I am reworking can be found on
http://office.microsoft.com/assistance/2002/articles/pwDeleteSenders.aspx
I am modifying it to make it work with Outlook 2000 (instead of 2002).
All works fine except for the above question.
If you are interested in the reworked code, just let me know.
 
There is no Outlook property that returns the sender's email address. You can either use CDO (or Redemption to avoid security prompts -- http://www.dimastr.com/redemption/) to get the From address or use Outlook to get the Reply To address. Sample code at http://www.slipstick.com/dev/code/getsenderaddy.htm.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm
 
Back
Top