View Single Post
 
Old 11-22-2018, 08:18 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,184
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote