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

Free Support Forum - aspose.com

Compare two document

good day,
I am comparing two documents and I get an error when comparing. Could you take a look at it for me?

Error:
“An object of type Aspose.Words.Tables.Table cannot be cast to type Aspose.Words.Paragraph.”}

thank you in advance
T.

@benestom Could you please attach the problematic documents here for testing? We will check the issue and provide you more information.

Document docXA = new Document(pathX + "DocA.docx");
Document docXB = new Document(pathX + "DocB.docx");
docXA.Compare(docXB, "author", DateTime.Now);

DocA.docx (30.5 KB)
docB.docx (33.5 KB)

@benestom Thank you for additional information. I cannot reproduce the problem with the latest 22.11 version of Aspose.Words. Please try using the latest version.

it’s fine with this version

thank you

1 Like

A post was split to a new topic: An error occurs when comparing two documents