Name of email sender

G

Guest

Hello!

I have emails in my inbox folder. In order to get the email address of the
sender I wrote the following:
adrs = Application.ActiveExplorer.Selection(1).SenderEmailAddress
And for my Sent Items folder I wrote:
adrs = Application.ActiveExplorer.Selection(1).To

It works fine.
The only problem is, when it doesn't say the address, and instead it says
the *name* of the sender (maybe because he replied to my email).

In this case how can I find the address of the sender?

Thanks,
Yonina.
 
D

Dmitry Streblechenko

To property lists the message recipients, not the sender. It contains ";"
separated names; to read the addresses, loop through the MailItem.Recipients
collection.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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