PDA

View Full Version : Received Date & Time of a mail



kbsudhir
04-08-2009, 01:13 PM
Hi All,

I want to know is it possible to get capture the received date & time of the first mail in a chain mail, without looking into the body of the mail using VBA.

Ex. I am having to & fro communication in the same mail. Now after lets say 5Replies I want to know when I received this mail originally without looking into the mail body.

Regards
Sudhir

Demosthine
04-09-2009, 08:46 AM
Good Morning.

Without a little bit more information, it's hard to give you an example. But in general, you will need your VBA Code to access your active message. If you are viewing the list of messages from your Inbox and have the appropriate message selected, you can use the example from the Outlook Help File for the Selection Property.

Using that example, you would modify the line where it references the SenderName Property and change that to a search function. Use the InStrRev Function to search the Body from the end to the beginning. Search for the string "Sent: " and it should find the date/time of the last message in the sequence.

Take care.
Scott