Search for text including formatting

Is there a way to search in a document for text and formatting?

We have documents where we have something like formfields which have to be filled. These ‘formfields’ always start and end with a ‘@’-character and are double underlined.

Thomas

Found a solution myself:
use a ReplacingCallback and check the MatchNode.Text and Matchnode.Font.Underline arguments.
Right?

Thomas

Hi Thomas,

Thanks for your inquiry. To find and replace text, please use Range.Replace method. To get the formatting of text, please implement the IReplacingCallback interface. In IReplacingCallback.Replacing method, please use ReplacingArgs.MatchNode property to get the matched node. Please cast the matched node into Run node and use Run.Font property to get text formatting.

Please let us know if you have any more queries.