View Single Post
 
Old 09-07-2015, 11:41 AM
cyraxote cyraxote is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Sep 2015
Location: Essex, MD
Posts: 24
cyraxote is on a distinguished road
Default

Well, I shut Word between the different sessions (i.e., when I first posted the loop problem and when Graham responded), so it seems unlikely that something is "sticking." However, I added this:

Code:
With oRng.Find
    .Highlight = True
    .Wrap = wdFindStop
    Do While oRng.Find.Execute
I think that accomplishes the same thing as what you suggest, right? However, it had no effect on the endless loop.

I think I may have to back up and maybe use the Selection object to just test characters (i.e., "^?") instead of whatever this is doing. I'm unfamiliar with the Range object; stepping through this macro puzzles me, because it finds whole swaths of highlighted text at once, instead of just one character.

Then again, that's what happens when you search for no text with "Highlight" in the Find and Replace box.

I don't know what to think.
Reply With Quote