I get hundreds of emails everyday in the exact same format. I need to copy one piece of text from each of these emails and move it to an excel spreadsheet, I imagine that a VBA code in Outlook is the solution to automate this. All of the emails are formatted exactly the same. I am using Outlook 2007 and Excel 2007. The emails are currently moved to a subfolder of Inbox using a Rule. The subfolder is titled Dispense Files.
The only part of the emails I need is the 11 digits following the text "Error: Unable to validate product ". I have a spreadsheet saved to my desktop titled FileErrors.xlsx where I want to copy the 11 digit numbers to.
Sample email body:
__________________________________________________________________________________________________________________________
Category: Inventory
Type: Information
Name: \\path
Date/Time: 10/08/2012 10:00:44 AM
Body:
A dispense file has been processed.
Total Records Successfully Processed: 19884
Total Records with Error: 231
Details of Errors:
-------------------------
Error: Unable to validate product 39800064493
Error: Unable to validate product 31101741009
Error: Unable to validate product 01571810340
Error: Unable to validate product 19515088907
Error: Unable to validate product 19515088907
Error: Unable to validate product 38137005685
Error: Unable to validate product 51552030707
Error: Unable to validate product 54629000020
Error: Unable to validate product 74098527087
Error: Unable to validate product 09047073552
Error: Unable to validate product 67253046110
Error: Unable to validate product 50924027201
Error: Unable to find location matching ID 1568756
Error: Unable to validate product 00193957001
Error: Unable to find location matching ID 1568756
Error: Unable to validate product 30014010001
Error: Unable to validate product 94030000202
Error: Unable to validate product 08881676285
Error: Unable to validate product 53329045040
__________________________________________________________________________________________________________________________
THANK YOU!
Bookmarks