How to (Use Outlook to search for text in message)

  • Thread starter Thread starter sturger
  • Start date Start date
S

sturger

I would like to know how to create a macro that will read all messages in
current and sub folders looking for the following information,

Messages where "Leave Alone" is found and out put is
Virus Found "Inserts Virus iNFO" | Computer "Computer Name"

Example Alert message
Alert: Virus Found TEST
Leave Alone
Computer: PC1234
Date: 11/24/2007
Time: 7:09:59 PM
Severity: Critical


Thanks,
 
Here's a sample for how to loop recursively through the folders:
http://www.vboffice.net/sample.html?mnu=2&id=6&smp=12&cmd=showitem&lang=en

For the current folder first call:

LoopItems Application.activeExplorer.CurrentFolder

And then:

LoopFolders Application.ActiveExplorer.CurrentFolder.Folders

In HandleItem you might look for any text either in the item's Subject or
Body property. Use the Instr function for that.

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Color Categories & Ensure that Every Item Gets Categorized:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>


Am Sun, 25 Nov 2007 05:41:00 -0800 schrieb sturger:
 
Back
Top