View Single Post
 
Old 12-12-2021, 03:34 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,166
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I would start by looking at the .Wrap = wdFindStop
This would be telling the code to stop when it gets to the end of the document. At the end of the first pass, your selection object would be near the end so if there are no second pass entries between it and the end of the document then nothing will be found.

You could change it to wdFindContinue or reset the selection to the top of the document at the start of each loop.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote