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

Free Support Forum - aspose.com

Aspose.Words Document instantiation error

Hi,

I am using Aspose.Words 5.2.0 .net. When trying to open the attached wordml file using

doc = New Aspose.Words.Document(FilePath & Filename)

I get the following exception:

Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. ---> System.ArgumentNullException: Key cannot be null.
Parameter name: key
at System.Collections.Hashtable.get_Item(Object key)
at ع.᣾.ᤂ(Hashtable ᤃ, Object ᤄ, Object ᤅ)
at ⅵ.ⅴ.↎(String ՙ)
at ᶴ.Ⅻ.Ქ(ᶳ ൐, ArrayList Ⅼ, Hashtable Ⅽ)
at ᶴ.Ⅻ.ඓ(ᶳ ൐)
at ᶴ.ᶳ.ඓ()
at Aspose.Words.Document.ࡂ(Stream م, LoadFormat ࡃ, String أ)
--- End of inner exception stack trace ---
at Aspose.Words.Document.ࡄ(Exception ࡅ)
at Aspose.Words.Document.ࡂ(Stream م, LoadFormat ࡃ, String أ)
at Aspose.Words.Document..ctor(String fileName, LoadFormat loadFormat, String password)
at Aspose.Words.Document..ctor(String fileName)
at DocumentExplorer.MainForm.OpenDocument() in C:\Program Files\Aspose\Aspose.Words\Demos\CSharp\DocumentExplorer\MainForm.cs:line 567

The file opens fine in MS Word and coincidentally the corresponding .doc version of the file opens fine in Aspose.Words. the document has some asian fonts embedded in it, which I suspect Aspose is having trouble with in the WordML format.

Please let me know if you need any more information.

Thanks,

Stu

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. I managed to reproduce this problem on my side. I created new issue #5506 in our defect database. We will notify you as soon as it is fixed.

Best regards.

Hi Alexey,

Any news on this issue?

Thanks,

Stu

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. This issue is already resolved in our codebase. We will release the next hotfix within 2-3 weeks. I will notify you as soon as it is done.

Best regards.

ok, sounds great.

The issues you have found earlier (filed as 5506) have been fixed in this update. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />