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

Free Support Forum - aspose.com

Aspose.Word .Net 21.6 throw "Unable to cast object of type" when loading the doc file

We’re using Aspose.Word .NET 21.6 to loading the DOC file. But when loading the attached file, an exception with the message “Unable to cast object of type '\u000e ​ ’ to type '\u0003 ​ '.” was thrown.

    var doc = new Aspose.Words.Document("sample.doc");
catch (Exception e)

Sample file: sample.zip (13.3 KB)


You’re right; Aspose.Words for .NET currently throws following exception upon loading this particular Word DOC document.

  Message=Unable to cast object of type ' ​ ' to type ' ​ '.

We have logged this problem in our issue tracking system with ID WORDSNET-22389. 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.

Thank you for your quick response.

1 Like

Hi @awais.hafeez,
Is there any updates on this issue?
Thank you


We have included the fix of this issue (WORDSNET-22389) in 21.7 version of Aspose.Words for .NET API (see release notes). So, we suggest you to please upgrade to the latest version.

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