I have to find the sender's email address

  • Follow


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.
0
Reply win 1/28/2010 12:06:01 PM

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

-- 
Sue Mosher, Outlook MVP
   Author of Microsoft Outlook 2007 Programming:
     Jumpstart for Power Users and Administrators
    http://www.outlookcode.com/article.aspx?id=54


"win" <wintelreport@gmail.com> wrote in message 
news:5992e67c-6655-4638-bf58-6ca1d60a52a4@21g2000yqj.googlegroups.com...
>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. 


0
Reply Sue 1/28/2010 1:30:21 PM


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" <wintelreport@gmail.com> wrote in message 
news:5992e67c-6655-4638-bf58-6ca1d60a52a4@21g2000yqj.googlegroups.com...
>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. 

0
Reply Ken 1/28/2010 3:32:10 PM

2 Replies
250 Views

(page loaded in 0.096 seconds)

Similiar Articles:
















7/20/2012 3:21:14 PM


Reply: