I am new to the VBA for Outlook and I would highly appreciate some help.
I have to search my very old mailbox for certain data. Recalling the structure of information in the mails, best way is to make two searches.
Each search should use list of keywords from a column in an separate excel worksheet (one column for each search in onw worksheet). The list of keywords for the first search contains some 30-40 keywords, some of them masked with asterisk (example below). The list of keywords for the second search is around 10-15 words (example below). If a keyword is met during the search, the email should go on the list with the search results. Results should ignore first capital letter, all caps and small caps of the keywords.
I expect the results from the first search will be too many. For this reason I would like to be able to run a second search through the results from the first search. For this purpose, results from the first search have to be copied (not moved) into a new e-mail folder, and the e-mails in this folder will be the starting point for the second search.
The search should include subject and body of the mail. If attachements cannot be searched (which I expect), then e-mails which contain attachment should also go on the list of results from the search.
Here are several of the keywords from the first list:
profit; loss; EBIT*; interes*; operating; cost; balance; financ*; loan; margi*; expens*; recur*;
Here are some of the words from the second list:
2023; previous year; last year; previous 2 years; previous two years; last 2 years; last two years;
I will be much obliged for some help on the above.
I went through several threads, but I did not find a definitive solution that meets the above needs.