I think I've gotten my macro to work, but I'm not sure why what I did fixed the problem.
The macro searches for certain words to be replaced with an abbreviation. For example, it could replace the word payment with the abbreviation pmt. But in some cases I don't want the word to be selected at all. So I alter or lock the word with hidden text by inserting the phrase Lock_Word in the middle of the word payment. When the macro is searching for the word payment, I have hidden text displayed using the HiddenTextShowAll (On!) command so that the word payment is not found. But in the first instance of the locked word, even though the locked word displays as payLock_Wordment, the macro still selects the locked word, as if it was simply the word payment, and gives me the option of replacing the word.The solution appears to be to also use the Display(On!) command. I've read the Help file about the description of this command. And I've used this command in the past, with a timing command, to display a macro so I can see the individual steps being executed. But in this case, I do not understand what the command is doing in my macro and why it appears to have fixed the problem. I'm not positive that the problem has been fixed, but I have done enough follow up testing that I am pretty sure that the Display(On!) command has fixed the problem.Does any one know why the Display(On!) command might have fixed the problem?
I do not.
I inserted Hidden "LockWord" into three different words, had the macro repeatedly search for the three words. With Show Hidden Text enabled, the numbers found were 4, 1, 4; with it disabled, the numbers were 5, 1, 5. Using Display(On!) or not made no difference.
Thanks for checking and testing. I agree that it shouldn't make any difference. But it seems to make a difference. Something is obviously interacting with something else. So I'll have to keep looking for the needle in the haystack and try to figure it out.
Sometimes Reveal Codes On/Off makes a difference. In this case, I just tested and found none.