+ Reply to Thread
Results 1 to 2 of 2

Extract text from Outlook email body - where same key word occurs multiple times VBA 2010

  1. #1
    Registered User
    Join Date
    01-21-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Extract text from Outlook email body - where same key word occurs multiple times VBA 2010

    Hi,

    I am trying to extract specific lines of data from the body of an Outlook 2010 email and pass them to an Excel 2010 spreadsheet. You'll see from my attached code below that it looks to the email body for key words and extracts the text immediately following the key word. The code works when only one instance of a key word exists but is insufficient to cope with multiple instances. For example, the code below, when applied to the email body example – also below – when it encounters the key word ‘Fault’ returns the words “Enter button sticking” . What I am asking for your help with is how best to alter my existing code to also return the value following the second instance of the word ‘Fault’, viz. “M5 Not reading "ALL CARDS".
    This is my first post. I've benefited greatly from the site already so thanks to those who take the time to contribute.

    Email body

    Site Name : CANTERBURY
    Site Code : ES55
    Site Type : CRANLEIGH COMPANY SITES
    Job Ref : 886677
    Shipping ID :222222
    Serial No. : 209-665-113
    Fault : Enter Button Sticking
    Serial No. 1 : 209-665-385
    Fault : M5 Not reading "ALL CARDS"


    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    01-21-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Extract text from Outlook email body - where same key word occurs multiple times VBA 2

    Thank you to those who took the time to read the post. I'll try again elsewhere.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-12-2013, 07:43 AM
  2. Outlook : Auto Save Email body to Word / Text
    By sgcareerman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2012, 10:23 AM
  3. [SOLVED] Count how many times a word occurs in a cell containing text
    By frisbie17 in forum Excel General
    Replies: 2
    Last Post: 08-01-2012, 02:31 PM
  4. Extract outlook message body text with VBA from Excel
    By jamsta1972 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-31-2012, 05:43 PM
  5. Outlook 2010 macro to extract data from email
    By jeskit in forum Outlook Programming / VBA / Macros
    Replies: 5
    Last Post: 06-27-2011, 05:44 AM

Tags for this Thread

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