Sep 17 2018 05:38 PM
After the latest update to Windows, Find-and-Replace stopped working correctly for many cases. In particular, if you try to specify font attributes in a replace, they are usually ignored. Also, the Replace button does not advance to the next item.
I have a VBA application that helps me produce books and many of its operations just stopped working correctly. When I tried to do them manually from the Word document window, they failed there as well.
One example is a FInd-and-Replace with the search text "(/)(*)(/)" with a font of "MS Trebuchet" specified to find all cases of "/name/" in that font. Wildcards are enabled.
The replacement text is "\2" which should remove the slashes around the name. I specify highlighting the text on the replacement. The slashes disappear, but no highlighting occurs.
Doing it manually from the Word window has the same problem so it's not just a VBA issue.
So, I tried it specifying that the replacement text should be "red". No luck there either.
I finally rewrote the code to only use the find part and then use a While .Execute loop to do the replacement.
OK, so that workaround did the trick. Unfortunately, I have many other cases that do a find-and-replace where attributes are part of the operation. I'm not looking forward to having to rewrite a lot of code to get around what is apparently a new bug.
If I can't find a fast solution, I will try to revert the last Windows update. As that doesn't always work well, I'm trying to avoid it.
Thanks for any suggestions.
Sep 18 2018 06:33 AM
Yes! I've noticed the following new behavior in the past few days:
Our office uses Find-and-Replace in LOTS of VBA procedures every single day, and many of those procedures are used by people who need to click a button and have it run flawlessly, so this is a problem for us.
Sep 18 2018 08:03 AM
A really simple test anyone can do.
1. Open almost any document in Word. Do a find-and-replace (Ctrl-h) from the keyboard.
2. Specify the text to find as "the".
3. Specify the replacement text as "^&" (which means with the same text we just found).
4. Specify that the replacement text should be "red".
5. Click on "Replace all".
It should then run for a long time and tell you that it did a huge number of replacements (in one test 34281, but a simple Find of "the" showed 284 instances), but nothing is actually changed.
6. Click on "Find next" then on "Replace".
Nothing is changed and it does not advance to the next find after clicking on "Replace". Click on "Find next" and it does advance but nothing was changed for the previous instance. You can do this as much as you want and the same things happens over again each time.
Sep 19 2018 02:22 AM
SolutionMagic happened. I'm not sure what it was, but everything started working again about 3am this morning. I couldn't sleep and doing some work that included running my app. Imagine my surprise when everything worked.
I've looked and can't see anything that updated.
Oh well, another mystery. But, I'll take it. I was getting desperate.
Sep 19 2018 05:51 AM
Same here! I even left Word VBA running and stopped in the middle of a procedure when I left work yesterday (on purpose because I was coding a workaround), and it was still up when I arrived this morning, so it doesn't look like anything even had to be restarted. Like you, I'll take it.
Sep 19 2018 02:22 AM
SolutionMagic happened. I'm not sure what it was, but everything started working again about 3am this morning. I couldn't sleep and doing some work that included running my app. Imagine my surprise when everything worked.
I've looked and can't see anything that updated.
Oh well, another mystery. But, I'll take it. I was getting desperate.