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

Free Support Forum - aspose.com

Compare get exception with SpecialChar

When one of the document has SpecialChar, compare fail with the Message:“Unable to cast object of type ‘Aspose.Words.SpecialChar’ to type ‘Aspose.Words.Run’.” .

Here the code :
Document d = new Document(Path.Combine(SampleFiles, “OrgSampleBookMarks.docx”));
Document d1 = new Document(Path.Combine(SampleFiles, “OrgSampleBookMarks2.docx”));

d.Compare(d1, “t”, DateTime.Now);
d.Save(Path.Combine(SampleFiles, “CompareSample.Docx”));

Compare.zip (58.8 KB)

Note : Fast way to insert SpecialChar : ALT+04 …


We tested the scenario and managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-17783. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

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