I marked this thread as solved but on further testing, the code isn't working as expected. I ran it on a document containing text within brackets after cross reference fields and general text in brackets. The code formats all text within brackets to italics and not just the text in brackets after a cross reference field. Any advice what I can add to the code to prevent the code from formatting all text within brackets to italics?
Capture.JPG