VBA Script to extract text matching specific criteria

Status
Not open for further replies.
Outlook version
Outlook 2013 32 bit
Email Account
Exchange Server
Hi guys,

I'm looking to automate a tedious part of my job. I get incoming requests via email from clients, from which i need to extract text strings and copy them into a new row in a an Excel file, in a particular column (e.g. the next blank row in Column G).

The text strings are always 7 characters long, and are alphanumeric (no special characters). Sometimes they are just text on one line of an email, or in a table, or in an Excel attachment -- simple text or tables are most common, I'm less worried about attached Excel files (though that would be useful too).

An example text string might be: A79R12X

I have an Excel file where I record all these text strings for a given period (usually a financial quarter).

Is it possible for a script to extract every occurrence of those strings? I anticipate that it will catch lots of duplicates (e.g. the same email thread will have the initial text string occurring at the bottom of the chain, so that might get picked up more than once). That would not be hugely problematic -- I would rather the script catch every instance than miss any -- since I can run a macro in the destination Excel file to remove any duplicates.

Cheers!
 
Status
Not open for further replies.
Top