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

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.
 
S

Sue Mosher [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top