Platform SDK: CDO 1.2.1 |
The TimeReceived property returns the date and time the message was received as a vbDate variant data type. Read-only.
objMessage.TimeReceived
Variant (vbDate format)
If the time of reception is not available, the TimeReceived property returns the date and time the message was sent.
The TimeReceived and TimeSent properties set and return dates and times as the local time for the user's system.
This code fragment displays the date and time a message was sent and received:
' from the sample function Message_TimeSentAndReceived ' verify that objMessage is valid, then ... With objMessage strMsg = "Message sent " & Format(.TimeSent, "Short Date") strMsg = strMsg & ", " & Format(.TimeSent, "Long Time") strMsg = strMsg & "; received " strMsg = strMsg & Format(.TimeReceived, "Short Date") & ", " strMsg = strMsg & Format(.TimeReceived, "Long Time") MsgBox strMsg End With