Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   I have to find the sender's email address (http://www.outlookbanter.com/outlook-vba/99546-i-have-find-senders-email.html)

win January 28th 10 12:06 PM

I have to find the sender's email address
 
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.

Ken Slovak - [MVP - Outlook] January 28th 10 03:32 PM

I have to find the sender's email address
 
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"win" wrote in message
...
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.




All times are GMT +1. The time now is 05:12 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com