I put this solution together for a reader named Rakesh. Rakesh asked for a solution that counts the number of times certain words occur in Outlook messages received within a given date range. The list of words he wants to count are in column B of a spreadsheet, one word per row. Rakesh wants the counts to appear next to the words in column C. Here’s how Rakesh will use the solution.
- Select the Outlook folder containing the messages he wants to process
- Run the macro
- Enter the path and file name of the Excel workbook containing the words he wants to count for
- Enter a date range.
The macro scans every message in the selected folder that arrived within the date range he entered. The code scans each message for every word in the workbook and write the counts to the spreadsheet. Continue reading