![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Received eMail Message Not Showng | pmitch | Outlook Express | 1 | September 9th 07 10:46 AM |
I cannot open a URL in a received email message in Outlook 2003 | Paul Mayer | Outlook - General Queries | 1 | July 11th 07 08:00 PM |
adding multiple contacts at one time from a received email | [email protected] | Outlook - General Queries | 4 | November 5th 06 02:56 AM |
Email message auto opens when received | Moresteins | Outlook - Installation | 0 | October 20th 06 09:07 PM |
How do i change the sent time to received time in outlook message? | Freedom | Outlook - General Queries | 1 | August 1st 06 02:42 PM |