Docx to docx

when i try to create docx document, i think the engine doesn’t work

Dim kkk As new Aspose.Words.LoadOptions
kkk.LoadFormat = LoadFormat.Docx
Dim doc As Document = New Document("c:_br\299452-Dopis.docx", kkk)

doc.Save("c:_br\test.docx", SaveFormat.Docx)

the template “299452-Dopis.docx” is in new ms word 2010 format

when i try to save the result document, i get an error (Capture.PNG)

Hi Erik,

Thanks for your inquiry. Perhaps you’re using an older version of Aspose.Words; as with Aspose.Words v11.10.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v11.10.0. You can download it from the following link:

Best regards,

i’m using v11.10.0. that was my first thought

i’ve attachmed result document. please check the header line in the template and the result document

Hi Erik,

Thanks for the additional information. Please specify Iso29500_2008_Transitional OOXML specification option to use when saving in the DOCX format as follows:

Document doc = new Document(@"C:\Temp\template.docx");
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(SaveFormat.Docx);
saveOptions.Compliance = OoxmlCompliance.Iso29500_2008_Transitional;
doc.Save(@"C:\Temp\out.docx", saveOptions);

I hope, this helps.

Best regards,

thkx, it’s working

Hi Erik,

It’s great you were able to achieve what you were looking for. Please let us know any time you have any
further queries.

Best regards,