We have a Trust Document that has multiple combinations of Articles. For example:
Article 4, 5 & 6 have four different types of Article 4, 5 & 6. So, I cross reference each type to accommodate any choice that is made by the user. The resulting document contains many of the following example:
Error! Reference source not found.Error! Reference source not found.ARTICLE 5
I have created a simple macro that finds Error! Reference source not found. and replaces it with nothing. Although in the document the cross reference codes appear as if they are gone (no spaces left - nothing) they really are still there. I know this because when I create a table of contents in the finished document, the "Error! Reference source not found." reappears in the document. Also, you can press Alt+F9 and see the codes that should have been gone.
How do I remove only those cross reference codes that are invalid?
Thanks so much to this brain trust.