Email Body to Excel

glaupie

New Member
Joined
Sep 8, 2010
Messages
45
Hi There,

Not sure if this is the correct place to post this question, but hopefully someone can hel me out.

Every day I get a system email that confirms the upload of a bulk SMS file to an FTP server, from where another company will collect it and send out the SMS's throughout the day.

The file confirms the upload and filename in 2 lines, the shows all errors (usually invalid cell phone numbers), with ~ as delimiter between the cell number, SMS Message and Reject Code.

I need a way to export ONLY the errors into excel as the email arrives, and then send it to our Customer Service guys. SO I need a script to look at all incoming emails from that address and run a script to copy all text AFTER the word "Errors" to excel, then (maybe) run an excel macro to do text to columns and send the email?

Example of email message:



Hi Gerhard Laubscher, you uploaded a file with username : EMC-Gerhard

File processed (eventid - 172888944) : Tenacity_ZA_20130118033040.txt

Errors:
27000000000~Mr Ndzo, we are trying to contact you re. your Dunns account. Payment required: R650.70. Ref: 10201102120001069561. Tel: 0860992222.~PROD-2543464 - Number Incorrect
27000000000~Mrs Sekhonyane, we are trying to contact you re. your Dunns account. Payment required: R395.89. Ref: 1944210005484474. Tel: 0860992222.~PROD-2543234 - Number Incorrect
27000000000~Mr Gezula, we are trying to contact you re. your Dunns account. Payment required: R427.29. Ref: 1944210005220795. Tel: 0860992222.~PROD-2543566 - Number Incorrect
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top