Get Received date from a email

  • Thread starter Thread starter Lasse Matsson
  • Start date Start date
L

Lasse Matsson

Hi,

How can I read out the senders Email adress and when I received it from a
mail?

I can get the SenderName, Subject, Body and Attachment.
But I can´t find how I get the Emailadress and when Ireceived it.

Can somebody help me.

//Lasse
 
In Outlook 2003, you can use the MailItem.SenderEmailAddress, but note that it's subject to security prompts.

In earlier versions, 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.outlookcode.com/d/code/getsenderaddy.htm

To get the SMTP address from an Exchange sender or recipient, use CDO or Redemption and the PR_EMAIL (&H39FE001E) MAPI property to obtain the SMTP address from the AddressEntry object. See http://www.outlookcode.com/d/code/getsenderaddy.htm#redemption and http://www.cdolive.com/cdo5.htm#EMailAddressOfSender for examples.

Use the object browser (F2 in VB or VBA) to get the names of the other MailItem fields, including the date fields.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top