PC Review


Reply
Thread Tools Rate Thread

Received Date Time

 
 
=?Utf-8?B?a2M=?=
Guest
Posts: n/a
 
      16th Nov 2005
How can I export to access or even excel the time date a message was received?

/r
KC
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      17th Nov 2005
This example should give you a headstart:

Sub ExportPropertyValueFromActiveMessageToExcel()
On Error Resume Next

'Must have the e-mail in question open
'Ensure that you have set a reference to the Microsoft Excel X.0 Object Model
Dim objMail As Outlook.MailItem
Dim objWkb As Excel.Workbook, objWks As Excel.Worksheet
Dim objExcel As Excel.Application

If ActiveInspector Is Nothing Then Exit Sub 'No open e-mail
If ActiveInspector.CurrentItem.Class <> olmail Then Exit Sub 'only work
with e-mail items

Set objMail = ActiveInspector.CurrentItem
Set objExcel = New Excel.Application
Set objWkb = objExcel.Workbooks.Add
Set objWks = objExcel.ActiveSheet
objExcel.Visible = True

'Populate Column A, Row 1
objWks.Cells(1, 1) = objMail.ReceivedTime

Set objWks = Nothing
Set objExcel = Nothing
Set objWkb = Nothing
Set objMail = Nothing
End Sub

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"kc" wrote:

> How can I export to access or even excel the time date a message was received?
>
> /r
> KC

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Received msg date and time wrong =?Utf-8?B?bWFnbnVz?= Microsoft Outlook Discussion 0 4th Sep 2007 04:28 PM
Calcualting the time between email received date and reply date =?Utf-8?B?U2hhbmtz?= Microsoft Outlook 3 22nd Feb 2007 04:11 AM
Date sent & received is wrong but computer time is OK =?Utf-8?B?Sm9kaSBUb29oZXk=?= Microsoft Outlook Discussion 0 1st Sep 2006 01:39 AM
How to organise received mail by date and time =?Utf-8?B?QmlsbHkgUw==?= Microsoft Outlook Discussion 1 30th Jan 2006 10:49 AM
Why the date/time of received mail in MS Outlook is different fro. =?Utf-8?B?Umljaw==?= Microsoft Outlook Discussion 1 15th Nov 2004 01:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:51 PM.