No its not meant to work that way. But as I said before, the grey text can be defined in a myriad of ways. If you look at the code I provided, it assumes the grey is coloured using a particular colour specification - but not all greys are the same. the code I provided worked on the New file you uploaded. If you test on that file (after removing the content controls you put in there) you would see the correct result. The code is not clever enough to find every possible grey. If your other documents were consistent in exactly which grey then we could specify the exact colour to find.
A more robust solution would be to apply a particular character style to the tags and then the macro could search for that character style. It might also be possible to search for the open and close tags <> which appear to define the start and finish of a tag but if those angle brackets appear somewhere else then that code would fail.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|