-
Can you confirm:
- Each email sent only once each day, or do we need to count the number of each type for each day?
- Would you be looking at unread emails only or all emails in the folder?
You should be able to loop through all the emails in a specific folder fairly easily, so it's just a matter of deciding what to do with them once you've read them.
This should get you started - please note it is untested (don't have Outlook onsite here)
[VBA]
Dim objNS As Namespace
Dim objInbox As MAPIFolder
Dim objMyFolder As MAPIFolder
Dim objItem As MailItem
Set objNS = objOL.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Set objMyFolder = objInbox.Folders("FOLDER_NAME_HERE") ' assumes your folder is sub of Inbox
For Each objItem In objMyFolder.Items
' test unread
If objItem.Unread Then
' do something
'objItem.Subject
'objItem.Sent
End If
Next objItem
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules