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

  • Thread starter Thread starter Raja
  • Start date Start date
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
 
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
 
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.
 
Back
Top