I have to find the sender's email address

W

win

I have to find the sender's email address.

But oMsg.SenderName -- > Sender Name returns the name.

How can I find the email address?

Thanks.
 
S

Sue Mosher [MVP]

oMsg.SenderEmailAddress -- Remember, the object browser (F2 in VBA) is your
friend.
 
K

Ken Slovak - [MVP - Outlook]

Outlook version?

If your version doesn't have the MailItem.SenderEmailAddress property it
must be an old version of Outlook. In that case there's nothing specific in
the Outlook object model for that.

You can create a dummy reply and get the address that way. Call the Reply()
method on the original item and then use the returned handle to the reply
item to get the Recipients collection and get the address from the
Recipient.Address property.
 

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