Search for incoming e-mails for a specified time range

Tomohawk

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
POP3
I need to create a report of the number of incoming e-mails for a specific date/time range and by category. Each e-mail is categorized, but would also need to report those with blank category, so best to report by all categories. The report would take the form of a list of those e-mails, ordered by category. I can select the range for each category and get the count that way.

Is it possible to create a search, which prompts for start date and time and end date and time and that can be saved and reused for this purpose.

Thanks

T
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You can do instant search, which is set up using a macro - or you can use a view with the fields visible that you need and copy & paste into Excel and filter there.

This macro has some examples - you'll replace the search string with the one you need and use input boxes to get the dates you want to use
For example, for received:>11/1/2019 <11/11/2019 category:="Anniversary"

strStart = InputBox("Enter Start date", "Enter date in mm/dd/yy format")
strEnd = InputBox("Enter End date", "Enter date in mm/dd/yy format")
strCategory = InputBox("Enter Category", "Enter category name")

txtSearch = " received:>" & strStart & " <" & strEnd & "category:=" & chr(34) & strCategory & chr(34)

 
Top