I have just discovered an error in Aspose.Words 13.11+
When using the code from http://www.aspose.com/docs/display/wordsnet/How+to+Find+and+Highlight+Text to search and highlight text, and have a run in which the word you search for is represented multiple times, the code fails.
This works in Aspose.Words 13.10 which is currently used in production, but upon upgrading to Aspose.Words. 14.4 the error appeared.
It seems possible the error stems from the fix to WORDSNET-9180.
If you search and highlight in the existing document for the word “word”, second time the Replacing method is called, the MatchNode is wrong and contains an MatchOffset beyond the limits of the node. Using Aspose.Words 13.10 this works as expected.
In 13.10 it continued from the current Run. In 13.11+ it seems like it finds all Runs up front, so if you modify the runs in the Replacing method it will get messed up.
Let me know if you need any further information to investigate.