Convert Save As ODT File to DOCX Document | C# Code of Aspose.Words for .NET | Manage NullReferenceException

When saving my docx to odt, I get this exception:\

System.NullReferenceException: Object reference not set to an instance of an object.
at 㔜.㘤.㘲(௜ ீ, ״ ᯴)
at 㔜.㘤.ূ(௜ ீ, ״ ᯴, Boolean 㖒)
at 㔜.㘤.ূ(௜ ீ, ״ ᯴)
at 㔜.㗚.⒱(Style ढ़)
at 㔜.㕮.㖂()
at 㔜.㕮.≭()
at 㔜.㕮.ূ()
at 㔜.㔛.㕐()
at 㔜.㔛.⇪(∕ ⇫)
at Aspose.Words.Document.ԃ(Stream Ӽ, String Ӻ, SaveFormat Ԅ)
at Aspose.Words.Document.Save(String fileName, SaveFormat fileFormat)
at FlexDoc.Cmd.Program.Main(String[] args) in C: \Data\ Sources\ FlexDoc\ Cmd\ Program.cs: line 37

In my code I open the docx, then use the Save-method to save it as doc (which looks ok), then use the Save-method to save it as odt:

Aspose.Words.Document doc = new Aspose.Words.Document(args[2], Aspose.Words.LoadFormat.Docx, null);
doc.Save(args[2] + ".doc", Aspose.Words.SaveFormat.Doc);
doc.Save(args[2] + ".odt", Aspose.Words.SaveFormat.Odt);

Hi

Thanks for your inquiry. The problem does not occur on the latest code base. It seems it is already resolved. So. Please wait for the next release, which will be published in 1 week.
Best regards.

Hi

We have release new version of Aspose.Words. You can download and try the latest version from here:
https://releases.aspose.com/words/net
Best regards.

No, still a NullReferenceException!
Check this new docx I tried it with today.

Hi

Thanks for your request. I successfully opened your document and saved it in ODT format using the latest version. Please make sure you use Aspose.Words 6.6.0 in your project.
Best regards.

It works now! I didn’t restart Visual Studio between the uninstall of 6.5 and installation of 6.6. It probably had the 5.5-version cached.