+ Reply to Thread
Results 1 to 8 of 8

Search Outlook subject lines for an email that matches selected cell value in Excel

  1. #1
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Search Outlook subject lines for an email that matches selected cell value in Excel

    Is it possible to use the selected cell value in excel to search subject lines in Outlook and reply all to the most recent email that matches it? I know I am not bringing much to the table here, but Excel to Outlook projects aren't really my thing so I do not even know where to start. I tried looking for templetes online, but most just show standard code to search for an email in outlook using a static message. I have had no luck using the selected cell value. Any help would be appreciated. If you would like to know more info, please don't hesitate to ask.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Search Outlook subject lines for an email that matches selected cell value in Excel

    Are we talking about Inbox or a folder?

    By match do you mean subject match, in which case, do you mean partial or whole match? Or do you mean thread match? (Outlook has data for which mails belong to the same thread).

    Exactly what do you mean by Most Recent? The last person to respond? or messages not responded to yet?
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Search Outlook subject lines for an email that matches selected cell value in Excel

    1. Inbox
    2. Subject exact match
    3. The last email received that has a subject line that matches our selected cells value

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Search Outlook subject lines for an email that matches selected cell value in Excel

    I think this will work for you.


    In cell B2, enter in the name of your mailbox: yourname@yourdomain.

    In cell B4, enter in the subject you want to search for. The program will strip off the Re: and Fwd: that appear on the subject lines in the box

    In Cell B6, enter in any message that you would like to start the reply message with.

    Click the button.

    There is a piece of the code you may want to change.
    Please Login or Register  to view this content.
    As the code is set up now, the message will be set up and brought up on the screen for further editing. It will not be sent until you press send in Outlook.

    If you comment this line out and comment in the .send line, then the message will be sent without intervention.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Search Outlook subject lines for an email that matches selected cell value in Excel

    Thank you very much for your help. This looks promising. The only issue I am running into is that when I change .body to HTMLBody and hit reply all, it makes it look like my response is part of their original email. I can provide a screen shot in the morning when I get to work.

    EDIT: Actually, it puts the new text in the original body even if I don't change it to HTML.
    Last edited by Teblol; 12-19-2018 at 11:15 AM.

  6. #6
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Search Outlook subject lines for an email that matches selected cell value in Excel

    This is how it looks when I hit reply.
    Attached Images Attached Images

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Search Outlook subject lines for an email that matches selected cell value in Excel

    This means that you have .Display enabled. This allows you to further edit the message before sending it manually.

    If you want the message to be sent automatically without intervention, then comment out .Display and remove the comment quote from .Send.

  8. #8
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Search Outlook subject lines for an email that matches selected cell value in Excel

    There is no way to display it with the new message above the old? Any time I have used .Display, it would display the message as if I already clicked reply. This current method is forcing me to click reply manually after the message gets displayed. Also, even if I choose .Send, it is still combining my new response with the original message, rather than placing the detail of the original message below my new response.
    Last edited by Teblol; 12-19-2018 at 03:27 PM. Reason: Added more to my response.

+ 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. Use Date in cell to trigger email via outlook, taking data from row as part of subject
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-15-2015, 08:34 AM
  2. Replies: 2
    Last Post: 09-14-2015, 01:14 PM
  3. Replies: 0
    Last Post: 06-18-2015, 05:35 PM
  4. vba pull data from outlook body of email through email or subject of mail into excel
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2014, 04:37 AM
  5. Replies: 8
    Last Post: 05-17-2013, 01:53 AM
  6. export outlook 2007 email into excel with subject and body of email
    By akulka58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2013, 02:37 PM
  7. Problem amending email subject in Outlook using Excel VBA
    By madbloke in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2012, 12:09 PM

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