+ Reply to Thread
Results 1 to 4 of 4

Return word/phrase following search term

  1. #1
    Registered User
    Join Date
    02-26-2011
    Location
    shrydvd
    MS-Off Ver
    Excel 2003
    Posts
    6

    Return word/phrase following search term

    I have a macro that searches for a phrase in the text of a pdf document using "FindText". It works great. However, what I need is for it to return the next word or phrase after the search term. It seems like it should be simple, but for the life of me, I can't figure it out or find anything on it.
    For example, I search for "Claim Number". The macro opens the pdf and highlights the first instance of "Claim Number". What I want though is for it to return the actual number. I search for "Claim Number" and I am returned "123456789". Or, search for "Patients Name" and get returned "John B. Doe".
    I have searched all over but can't seem to find this specific situation anywhere.
    Anyone have ideas?

    Thank you,

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Return word/phrase following search term

    Can you attached any file with this macro, please?
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    02-26-2011
    Location
    shrydvd
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Return word/phrase following search term

    I'm sorry I took so long to respond. Got tied up and just now getting back.
    What I am attaching is the original file I got online. What I am doing is the same thing, but I have mangled this guys example, so thought I would include his cleaner copy.
    Thank you for taking your time to look at this for me.
    Attached Files Attached Files

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Return word/phrase following search term

    I can't run it. Probably some library is missing.
    I'll try from home.

+ 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: 3
    Last Post: 03-29-2023, 07:18 AM
  2. Search and Return Phrase From Cell
    By timma in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-18-2019, 06:58 AM
  3. [SOLVED] Help needed with code to match word and phrase and return the results
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-21-2018, 06:48 AM
  4. Using VLOOKUP to find a specific word in a phrase and return a value
    By arnagas in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2016, 11:09 AM
  5. [SOLVED] can't search word or phrase in my database
    By kensho in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-15-2015, 06:01 AM
  6. Using Replace() to search for a two-word phrase
    By jpcsolutions in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-09-2015, 02:25 PM
  7. [SOLVED] Search using a Word/Phrase
    By hiteshasrani43 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-05-2015, 01:02 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