Hello Everyone,
My company sends out a monthly email to our customers, we usually get around 1500 emails returned with a delivery failure notification error. Someone is currently opening all these emails and copying the address from the body of the email and deleting it from our database. I found software that will grab these emails and compile all of them into an excel spreadsheet. So now I have the entire message from all of the delivery failure notification error emails. The good thing about this is that I now have the email address of who we originally sent to and got the error back from. This email address is in the body of the email and looks like this To: xxx@domain.com. My question is how can I search through this excel spreadsheet and return all of these email addresses (all of the emails are put into column A of the spreadsheet with each line of the email placed in a new row)? Here is my though process right now:
Create a macro and in the VBA editor write a function that will loop through each row of the entire spreadsheet and grab everything in the cell that follows "To: " and return that value into column B.
Unfortunately I am not sure how this code should look or if something like this is even possible. I am thinking a do while loop and then an if then statement stepping through each active cell. I would really appreciate any help or thoughts on this matter.
Thank you very much for your time and insight!!!
Josh
My company sends out a monthly email to our customers, we usually get around 1500 emails returned with a delivery failure notification error. Someone is currently opening all these emails and copying the address from the body of the email and deleting it from our database. I found software that will grab these emails and compile all of them into an excel spreadsheet. So now I have the entire message from all of the delivery failure notification error emails. The good thing about this is that I now have the email address of who we originally sent to and got the error back from. This email address is in the body of the email and looks like this To: xxx@domain.com. My question is how can I search through this excel spreadsheet and return all of these email addresses (all of the emails are put into column A of the spreadsheet with each line of the email placed in a new row)? Here is my though process right now:
Create a macro and in the VBA editor write a function that will loop through each row of the entire spreadsheet and grab everything in the cell that follows "To: " and return that value into column B.
Unfortunately I am not sure how this code should look or if something like this is even possible. I am thinking a do while loop and then an if then statement stepping through each active cell. I would really appreciate any help or thoughts on this matter.
Thank you very much for your time and insight!!!
Josh