View Single Post
 
Old 12-19-2019, 11:28 AM
mrplastic mrplastic is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Dec 2019
Posts: 3
mrplastic is on a distinguished road
Default Find and Replace Selected Text or Macro for finding selected text

I regularly have to search in word documents for a list of words and highlight each occurrence of those words. The problem is the list is variable from document to document so I have to copy+paste each word from the list one at a time in the find box and then replace all with highlighting.

Is there a way to set .text for the find function to whatever word(s) have been selected in the document?

The idea that I'm trying to achieve is the following workflow:

1) select word(s)
2) press shortcut key for macro
3) macro highlights every occurrence in the document of the word(s) from step 1, including my selection
4) repeat for every word in the list.

Thank you for any help you might be able to provide!
Reply With Quote