![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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, |
Ads |
#2
|
|||
|
|||
![]() Here's a sample for how to loop recursively through the folders: http://www.vboffice.net/sample.html?...owitem&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: 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, |
#3
|
|||
|
|||
![]()
Another approach would be to use the Application.AdvancedSearch method, which can both search subfolders and do substring searches.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Michael Bauer [MVP - Outlook]" wrote in message ... Here's a sample for how to loop recursively through the folders: http://www.vboffice.net/sample.html?...owitem&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: 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, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Live Search Maps for Outlook - How to stop text pasting in meeting | Victoria@DIG | Outlook - Calandaring | 4 | October 30th 08 11:04 PM |
Search & Replace Text in the Body of a Message | dch3 | Outlook and VBA | 1 | June 7th 07 03:45 AM |
search for text in a message, OE 6 | roger | Outlook Express | 1 | February 27th 07 12:43 AM |
Instant Search Outlook 2007 Text Display Incorrect | HNiesewand | Outlook - Installation | 0 | June 4th 06 01:58 PM |
Search email for text string to use in filename - save email text | bsteiner | Outlook and VBA | 3 | June 1st 06 10:20 PM |