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
|
|||
|
|||
message body- find any words in my array?
Using Outlook 2003, and I'm not familiar with the Outlook model (I'm decent
in Excel VBA) I have some working code that goes through an outlook folder and pulls some key strings out of the message body, and appends them to a CSV text file that I use in Excel. Right now it pulls that information (date, sender, invoice number) for every email in the selected Outlook folder. Now I'd like to limit the results to emails that do /not/ contain any of about 12 words, as invoices with those products are not necessary for my Excel number-crunching. What is the best (fastest) method to check the message body and see if any word/string in my array is present, anywhere in the email? IgnoreArray = Array("adjusted", "deferred", "tax", "demurrage", "deposit", [etc]) Thank you! |
Ads |
#2
|
|||
|
|||
message body- find any words in my array?
As a temporary solution, I'm looping through each item in my array and
checking Inst(A,B)0. If there is a better way, please let me know and I'll update my code accordingly. Thanks! Keith "ker_01" wrote: Using Outlook 2003, and I'm not familiar with the Outlook model (I'm decent in Excel VBA) I have some working code that goes through an outlook folder and pulls some key strings out of the message body, and appends them to a CSV text file that I use in Excel. Right now it pulls that information (date, sender, invoice number) for every email in the selected Outlook folder. Now I'd like to limit the results to emails that do /not/ contain any of about 12 words, as invoices with those products are not necessary for my Excel number-crunching. What is the best (fastest) method to check the message body and see if any word/string in my array is present, anywhere in the email? IgnoreArray = Array("adjusted", "deferred", "tax", "demurrage", "deposit", [etc]) Thank you! |
#3
|
|||
|
|||
message body- find any words in my array?
That's about the best way I can think of, although I think you meant you're
using the InStr() function. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "ker_01" wrote in message ... As a temporary solution, I'm looping through each item in my array and checking Inst(A,B)0. If there is a better way, please let me know and I'll update my code accordingly. Thanks! Keith "ker_01" wrote: Using Outlook 2003, and I'm not familiar with the Outlook model (I'm decent in Excel VBA) I have some working code that goes through an outlook folder and pulls some key strings out of the message body, and appends them to a CSV text file that I use in Excel. Right now it pulls that information (date, sender, invoice number) for every email in the selected Outlook folder. Now I'd like to limit the results to emails that do /not/ contain any of about 12 words, as invoices with those products are not necessary for my Excel number-crunching. What is the best (fastest) method to check the message body and see if any word/string in my array is present, anywhere in the email? IgnoreArray = Array("adjusted", "deferred", "tax", "demurrage", "deposit", [etc]) Thank you! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatic response to emails based on words in subject or body | Erin | Outlook - Using Forms | 3 | October 28th 07 12:55 PM |
Rule regarding words not in the body | [email protected] | Outlook - General Queries | 1 | August 14th 07 06:32 PM |
filtering spam by words in body or buying rules? | zero | Outlook Express | 3 | September 1st 06 07:30 PM |
OE6: Can email with certain words in body be blocked? | Fred | Outlook Express | 2 | June 14th 06 06:28 AM |
Change advanced find to 'subject field and message body' | ©® | Outlook - General Queries | 0 | February 23rd 06 02:57 PM |