View Single Post
  #2  
Old January 10th 08, 06:56 PM posted to microsoft.public.outlook.program_vba
JP[_3_]
external usenet poster
 
Posts: 201
Default Extracting received time from an email message

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