We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Find & Replace Left Right Double Quotation Marks in Word Document using C# .NET | 201C 201D

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?


We have logged this problem in our issue tracking system. Your ticket number is WORDSNET-22269. We will further look into the details of this problem and will keep you updated here on the status. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-22269) have been fixed in this Aspose.Words for .NET 21.8 update and this Aspose.Words for Java 21.8 update.