Hi,
We are working with Aspose.Words v15.7.0.0 to convert Word documents to Mhtml format in order to ultimately generate and send emails. We have encounter an issue with one particular document where the Save operation produce the error below:
//Code snippet
Aspose.Words.Document wordDocument = new Aspose.Words.Document(stream);
Aspose.Words.Saving.HtmlSaveOptions options = new Aspose.Words.Saving.HtmlSaveOptions(Aspose.Words.SaveFormat.Mhtml);
options.ExportHeadersFootersMode = Aspose.Words.Saving.ExportHeadersFootersMode.None;
using (MemoryStream outStream = new MemoryStream())
{
wordDocument.Save(outStream, options);
}
//Error
Object reference not set to an instance of an object
at . (String , Boolean )
at . ()
at . ()
at . ()
at . ()
at . ()
at . ( )
at Aspose.Words.Document. ( , SaveOptions )
at Aspose.Words.Document. (Stream , String , SaveOptions )
at Aspose.Words.Document.Save(Stream stream, SaveOptions saveOptions)
I have included a test application as an attachment. While debugging this case, we notice that if we removed a bullet point from the Word document, then the save would work. Both documents (success and failure) are included in the attachment. The only difference between both Word documents is that we added a bullet point to the second item.
Thanks,