Hi
I have a template in the old word format doc. I use that doing mailmerge with aspose.words.
Now I want to return the result document in docx. This seams to work (extension is corret), but the document opens in compatibility mode… When I try “save as” there is an warning about the new fileformat.
I use the following code to save the document:
response.Document.Save(@“d:\temp(” + Guid.NewGuid() + “).docx”, FileFormatUtil.ExtensionToSaveFormat(“docx”));
What am I doing wrong? I am using the last version of aspose.words.
Regards
Adrian
Hi Adrian,
Thanks for your inquiry. I think, you should just specify OOXMLCompliance:
http://docs.aspose.com/display/wordsnet/OoxmlSaveOptions+Class
Here is code example:
Document doc = new Document(@"Test001\in.docx");
OoxmlSaveOptions opt = new OoxmlSaveOptions(SaveFormat.Docx);
opt.Compliance = OoxmlCompliance.Iso29500_2008_Transitional;
doc.Save(@"Test001\out.docx", opt);
I hope, this will help.
Best regards,
Works!
Thank you!
Regards
Adrian