+ Reply to Thread
Results 1 to 5 of 5

Copy specific text from Outlook emails to Excel

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    Australia
    MS-Off Ver
    Outlook 2010
    Posts
    2

    Copy specific text from Outlook emails to Excel

    Hi

    I know this has been done before but I have searched for hours tyring different code and I cannot seem to get anything to work.

    I want the macro to look at all emails within a folder called 'new starters' in Outlook 2010

    I want the macro to look in the body of each email and find the text after the words "set at:" and paste this into column A of an excel spread sheet
    then from the same email I want it to find the text after the words "email address" and paste the text into column B of the same spread sheet

    Continue through the emails could be 200 emails therefore 200 rows in Excel.



    TIA
    Noel

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Copy specific text from Outlook emails to Excel

    Hi there,

    How is
    the text after the words "set at:"
    delineated - does the required text end with a space? With a linefeed and/or carriage return?

    Should spaces between the ":" character and the start of the text be included?

    Regards,

    Greg M

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Copy specific text from Outlook emails to Excel

    Hi again,

    I've assumed that the required text ends with a Carriage Return {Chr(13)} character, and that leading Space characters should be deleted.

    Try the following code and see if it does what you need:

    Please Login or Register  to view this content.
    The above code uses late binding so it's not necessary to set a reference to Outlook in the VBA Editor.

    The highlighted values can be altered to suit your own worksheet layout requirements.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  4. #4
    Registered User
    Join Date
    08-18-2015
    Location
    Australia
    MS-Off Ver
    Outlook 2010
    Posts
    2

    Re: Copy specific text from Outlook emails to Excel

    Hi Greg

    Thanks for the code.

    My understanding is limited and I had some errors and couldn't figure it out. I did look up an old thread and found something that sort of works, although when I get more time I will try and work through your code, I am just off line now for quite some time.

    Thanks very much for helping.

    Noel

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,467

    Re: Copy specific text from Outlook emails to Excel

    Hi again Noel,

    You're welcome.

    Many thanks for your feedback - hope my code eventually proves useful for you

    Enjoy your offline time, and best regards,

    Greg M

+ 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. Outlook Rules - moving emails from a sender in a specific address book
    By UKRyan in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 12-22-2014, 11:12 AM
  2. Copy specific cells as text into body of a new OUTLOOK message
    By guido0136 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-03-2014, 09:12 AM
  3. [SOLVED] copy emails from outlook into a folder
    By plans in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2014, 02:26 PM
  4. [SOLVED] Export specific rows of data into unique outlook emails per client
    By ryanexceln00b in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2013, 09:24 AM
  5. [SOLVED] Sending Outlook emails from Excel; Limits to three emails only?
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2013, 06:53 AM
  6. Saving Outlook Emails When Assigned to a Specific CATEGORY
    By jmr.noun in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-25-2012, 03:18 AM
  7. Send outlook emails with message in cells to individual emails associated with them
    By abinayan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2011, 06:11 AM

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