View Single Post
  #3  
Old January 10th 08, 07:33 PM posted to microsoft.public.outlook.program_vba
S Shipley
external usenet poster
 
Posts: 2
Default Extracting received time from an email message

Thanks JP - just what the doctor ordered.

"JP" wrote:

Sure, how about this?

Sub GetStuff()
Dim CurrentMsg As Outlook.MailItem
Set CurrentMsg = ActiveInspector.CurrentItem

MsgBox CurrentMsg.SenderEmailAddress & vbCr & vbCr & _
Format(CurrentMsg.ReceivedTime, "HH:MM:SS")

End Sub


Just double click to open the msg, then run this code.

HTH,
JP


On Jan 10, 1:26 pm, S Shipley
wrote:
I have used VBA for Excel and Word but this is my first foray into VBA for
Outlook so please forgive the newbie. I need to create a macro that takes an
open received email item and:
Extracts the From email address
The received time (need to have this in hh:mm:ss)
Displays both of these values in a message box
Is this even possible?

Thanks in advance for the help,
Sam



Ads