Consulting

Results 1 to 2 of 2

Thread: Received Date & Time of a mail

  1. #1
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    357
    Location

    Question Received Date & Time of a mail

    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

  2. #2
    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
    You don't understand anything until you learn it more than one way. ~Marvin Minsky

    I never teach my pupils; I only attempt to provide the conditions in which they can learn. - Albert Einstein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •