+ Reply to Thread
Results 1 to 4 of 4

Export part of email body to spreadsheet

Hybrid View

JuJuBe Export part of email body to... 10-05-2012, 03:57 PM
JuJuBe Re: Export part of email body... 10-05-2012, 06:14 PM
Leith Ross Re: Export part of email body... 10-05-2012, 06:22 PM
JuJuBe Re: Export part of email body... 10-05-2012, 06:26 PM
  1. #1
    Registered User
    Join Date
    03-05-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    75

    Export part of email body to spreadsheet

    I get hundreds of emails per day, all formatted exactly the same and I only need one small bit of info from the email. Here is what the body of the email looks like:

    __________________________________________________________________________________________________________________________
    Category: Inventory
    Type: Information
    Name: \\path
    Date/Time: 10/05/2012 02:00:19 PM
    Body:
    A file has been processed.

    Total Records Successfully Processed: 2011
    Total Records with Error: 13


    Details of Errors:
    -------------------------
    Error: Unable to validate product 00193957001
    Error: Unable to validate product 39800064493
    Error: Unable to validate product 31101741009
    Error: Unable to validate product 02571571091
    Error: Unable to validate product 04746000312
    Error: Unable to validate product 01571810340
    Error: Unable to validate product 19515088907
    Error: Unable to validate product 67253046110
    Error: Unable to validate product 50924027201
    Error: Unable to validate product 74098527087
    Error: Unable to validate product 19515088907
    Error: Unable to validate product 19515088907
    Error: Unable to validate product 38137005685
    __________________________________________________________________________________________________________________________

    The only part of the data I need is the 11 digit numbers after the phrase "Unable to validate product". I would like to select the emails in the inbox that I want to process, run a VBA macro, and have those 11 digit numbers copied to column A of a spreadsheet starting at A2. I would process through the numbers in the current spreadsheet, delete them, and resave a blank worksheet before processing the next batch of emails. I tried to take other VBA procedures I found online and adapt them to this but my VBA skills are weak at best. In a dream world, the marco would only process unread emails in the inbox. :D

    Thanks in advance for any help
    Last edited by JuJuBe; 10-05-2012 at 06:13 PM.

  2. #2
    Registered User
    Join Date
    03-05-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Export part of email body to spreadsheet

    Bump. Please!

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Export part of email body to spreadsheet

    Hello JuJuBe ,

    Are you using Outlook as your email client?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    03-05-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Export part of email body to spreadsheet

    Oops, yes Outlook 2007.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1