Hello,
I am trying to count the number of emails in a particular Outlook folder. However, I need the results returned to me by DAY. For example, if there are 3 emails total in the folder I need to know that 1 email is for 01/17/05 and 2 are for 1/23/05. I am able to get a count for the entire folder, but I am unable to figure out how to seperate the items by date.
Any help would be appreciated. My current code is listed below if that helps.
Regards,
Corey
I am trying to count the number of emails in a particular Outlook folder. However, I need the results returned to me by DAY. For example, if there are 3 emails total in the folder I need to know that 1 email is for 01/17/05 and 2 are for 1/23/05. I am able to get a count for the entire folder, but I am unable to figure out how to seperate the items by date.
Any help would be appreciated. My current code is listed below if that helps.
Regards,
Corey
Code:
Private Sub cmdCount_Click()
On Error Resume Next
Set objNS = Application.GetNamespace("MAPI")
Set objFolder = objNS.PickFolder
If objFolder Is Nothing Then
MsgBox "User pressed cancel"
Else
Set objEmails = objFolder.Items
Dim i As Integer
i = objEmails.Count
MsgBox "Total emails: " & i
End If
Set objNS = Nothing
Set objFolder = Nothing
Set objEmails = Nothing
End Sub