PDA

View Full Version : Help! Help! USing Excel/ VBA find a series of words and return the page # and Line #



zaccari5
05-20-2016, 08:35 AM
Help,

I have a list of words (about 800 words in the list) in Excel that I want to search/find a 200 page word doc. For each word found I want to:

Highlight the word in the doc
For each instance found save on defined Excel worksheet the word, the page# and the line#

SamT
05-20-2016, 04:05 PM
From the Windows Programs menu, Open Word.

Start recording a Macro.

Using only the Keyboard in while in the Word Window,


Open a copy of the 200 page Word Doc.
Find and highlight one of the words in your list.
find and highlight the next instance.
repeat one more time.
Close and save the copy.


Now you can use the mouse to stop recording the Macro.

Open Word VBA, copy the macro and in our Forum Editor, Click the # icon on the menu, then simply press Ctrl+V to paste your code in between the CODE Tags.