Now that I've gone back and done a little more testing, I concur with @Nige_S's assessment. Moreover, it appears that there are cases when LocalWords is not set in the preceding Search using Regular Expression.
I don't want to pollute this thread, but by PM I'll send you a version of the macro that includes an inserted group that might help you diagnose the issue.
Yes, I don't read personal messages, so I turned that feature off. I'm not sure why I would object to a revised macro. Feel free to do whatever you want. Do you want to take ownership of this macro? I wouldn't mind. I'm pretty easy going when it comes to anything I upload.
Yes, Nige's theory about LocalWords being empty is a theory, but he admitted his theory was "totally wrong." The fact that it can be empty is something I already accounted for in my macro, by placing it into a TRY block. As you showed in your screenshot, the macro works for you, so that can't be Stefan's problem then, right?