How to get the sent mail time stamp using VBA Macros or by rule

R

Raja

Hi,

Need to find the outlook sent mail time stamp, along with date.
i need this for thousand of mails sending perday --want this for, number of
mails that have been sent with a particular subject along with sent time
stamp as a report
 
A

Alan Moseley

Try this:-

Dim objSentFolder As Outlook.MAPIFolder
Dim objSentItem As Outlook.MailItem
Dim lngItems As Long
Dim lngCounter As Long
Set objSentFolder =
Outlook.GetNamespace("MAPI").GetDefaultFolder(olFolderSentMail)
For lngCounter = 1 To objSentFolder.Items.Count
If TypeName(objSentFolder.Items(lngCounter)) = "MailItem" Then
Set objSentItem = objSentFolder.Items(lngCounter)
'do something with the objSentItem object, for example
Debug.Print objSentItem.Subject, objSentItem.SentOn
Set objSentItem = Nothing
End If
Next
Set objSentFolder = Nothing
 
D

DKS

Hi Alan,

This solution looks quite similar to what I am looking for (see my post
Summarizing personal folders that was done just around the same time as you
keyed your solution in).

Only difference in my case is that I want a personal folder to be scanned
and not a SENT folder. In the personal folder, there would be mails SENT by
me and mails RECEIVED by me (as compared to only SENT mails in your solution).

Any fine-tunings to get your solution to work for me also?

Many thanks in anticipation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top