Unable to open cloned document in MS Office

Howdy. I’m using Aspose.Words 15.3.0.0 for .NET

I have a very simple piece of code:

var document = new Document(“input.docx”);
var documentCopy = (Document)document.Clone(true);
documentCopy.Save(“output.docx”, SaveFormat.Docx);

This code produces invalid MS Word file. If you look into document.xml, you can find the following xml element:

<wpg:cNvPr id="" name="" />

MS Word does not allow element with empty ‘id’ attribute, that’s why this file fails to be opened.

I would like this bug to be fixed ASAP. Such simple manipulations definitely should not produce completely broken documents.

Hi Artem,


Thanks for your inquiry. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-12752. Our product team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-12752) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.