PDA

View Full Version : Outlook data checked against a spreadsheet



rcbricker
01-26-2007, 07:10 AM
OK I have a new one. Seems the more help I give on spreadsheets the more I find that needs doing. I try and use the limited strings that I know to do the problems but always come here for faster and cleaner solutions.

This problem, I have no idea how to do.

We just received 6000 emails (Outlook) and they look like the .DOC that is attached, but the data is typed into the body of the email not attached as a word doc.

I need to have a solution that will extract the invoice number (that I highligthed on the word doc, but is not highlighted in the email) in the email and find it on a given spreadsheet. I then need to have the email flagged or moved to show that it is on the spreadsheet.

All the emails will start in the same folder but I need to be able to differentiate from the emails that contain invoice that are on the spreadsheet from those that are not on the spreadsheet.

A new development has the need for the "memo Number" data. SO he is asking if there is a way to extract the invoice number and the memo number to a spreadsheet and then have a search to verify that the invoice number is found on a second spreadsheet.

So column one will be Memo number
Column two will be invoice number and
Column three will be something to indicate that the invoice number is on the second spreadsheet, like an "X".

Any questions?

Simon Lloyd
01-27-2007, 03:01 AM
This link will help you get started http://www.vbaexpress.com/kb/getarticle.php?kb_id=222 but this next one actually tells you how to go about extracting text from an e-mail http://www.vbaexpress.com/forum/archive/index.php/t-4648.html

Regards,
Simon

rcbricker
01-29-2007, 06:54 AM
Simon thanks for your input. I will try this and see if it works.

Simon and all.

I looked this over and it is not much faster than opening the email and typing in the data. I need to check 6000 emails. I am hoping that if I put all of them in the same inbox subfolder and select that subfolder, that code can be written that will open the mail piece by piece and extract the info into a list. Memo in column A and Invoice in Column B and have the code look at a given SS and place a character in column C if the invoice is found in the SS.

I am asking this cause the 6000 emails happens on a regular basis and right now burns more than a full days work. THere has to be a better way.