quoted.docx (11.7 KB)
quoted-generated.docx (7.1 KB)
Here are 2 docs, one created in Word and one created using Aspose. Please try running the following replacement operation on both of them:
doc.Range.Replace("\"quoted\"", "James Bond", new FindReplaceOptions())
Observe that this works for the one generated by Aspose, but not the one coming from native Word.
I suspect this has something to do with the fact that in the doc generated by Aspose, straight double quotes are inserted, whereas Word by default inserts curly opening and closing double quotes as user types. Regardless, both kinds of quotes would be matched if the replacement were done using Microsoft.Office.Interop.Word, so I would expect Aspose to behave the same way. What’s the appropriate way to replace the text regardless of the styling of the double quotes?