We have discovered that latest version of Aspose.Words (20.10.0) fails on attempt to open the following simple WordML file:
<?xml version="1.0" encoding="UTF-8"?>
<w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns:tlr="http://www.elite.com/functions" xmlns:kmf="http://www.kleinmundo.com/functions" xmlns:trf="http://www.elite.com/functions" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:functx="http://www.functx.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<w:body>
<w:p>
<w:pPr>
<w:tabs>
<w:tab w:val="start" w:pos="720"/>
</w:tabs>
</w:pPr>
</w:p>
</w:body>
</w:wordDocument>
new Document(inFile) fails with the following error message:
Unhandled Exception: Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. ---> Sy
stem.NullReferenceException: Object reference not set to an instance of an object.
at ☼???.♥(String ☻, ☻??? ♥)
at ♥???(☻??? ☻, ♠??? ♥, ☻??? ♣)
at ♥???.☻(♥??? ☻, ♠??? ♥, ☻??? ♣)
at ♠???.☻(♥??? ☻, Paragraph ♥)
at ♠??????????☻(♥??? ☻)
at ♫???.♫???????♥(♥??? ☻)
at???.♥(♥??? ☻)
at???.☻(♥??? ☻)
at ♫?????????☻()
at Aspose.Words.Document.♥(Stream ☻, LoadOptions ♥)
--- End of inner exception stack trace ---
at Aspose.Words.Document.♥(Stream ☻, LoadOptions ♥)
at Aspose.Words.Document.☻(Stream ☻, LoadOptions ♥)
at Aspose.Words.Document..ctor(String fileName, LoadOptions loadOptions)
at Aspose.Words.Document..ctor(String fileName)
at Convert2Word.Old.WordUtil.BaseConvert(String inFile, String outFile) in D:\_\!work\Buchanan\Convert2Word\Convert2Word.
Old\WordUtil.cs:line 36
at C2W.Program.Main(String[] args) in D:\_\!work\Buchanan\Convert2Word\Convert2Word\Program.cs:line 15
It is interesting, but older version of Aspose.Words (e.g. 15.11.0 in our case) works fine. MS Word also can open such WordML file without any errors.
Do you have any suggestions?