View Single Post
 
Old 07-07-2020, 06:31 PM
MyUserName123 MyUserName123 is offline Windows 10 Office 2019
Novice
 
Join Date: Jul 2020
Posts: 10
MyUserName123 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
I tested the code and there is a difference when the trailing space is red vs when it isn't. If it is ONLY the word that is red, the code goes in to a loop. This doesn't happen if the trailing space is also red.

I haven't got time to work out the solution at the moment but will try to get back to it later today to come up with the workaround.

Hi, thanks for your response. That's very interesting. None of the words in my sample file had a red trailing space, but I just tried adding one to some of them, and then the macro seems to work until it hits an entry that doesn't have a red trailing space. And actually, something else I noticed while experimenting is that it goes into an infinite loop if there's a period immediately after the red text. And it doesn't seem to matter what color font the period is. It's really weird.
Reply With Quote