Outlook Message Read Receipt SentOn

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Outlook Message Read Receipt SentOn

Post by jstevens »

I am having a challenge obtaining the date sent on for a returned receipt message. I'm encountering an error on objItem.SentOn.

I can see the sent date on the returned receipt but the following line of code errors out. Otherwise the code works fine on other email message types.

strKey = objItem.Subject & "," & objItem.Body & "," & objItem.SentOn

Your suggestions are appreciated.
Regards,
John

User avatar
HansV
Administrator
Posts: 78788
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Outlook Message Read Receipt SentOn

Post by HansV »

You can check the Class of objItem.
For an email message, it is olMail, and you can use SentOn.
For a read receipt, it is olReport, and you can use CreationTime instead.
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Outlook Message Read Receipt SentOn

Post by jstevens »

Hans,

Your suggestion worked. :thankyou:
Regards,
John