Saved DOCM is in compatability mode

Hi,
I have a DOTM template created with Word 2010. When I create a DOCM document using Aspose Words (also tested with version 10.6), the resulting document is marked as being in Compatability Mode when opened in Word 2010.
I take it that it is because the file is in the 2007 xml format, and not in the updated 2010 xml format. Is there a way to save it using the new 2010 format, so that the users do not get the compatability message in the Word window titlebar?
Here is the very simple demo I’m using:

string templateName = @"c:\Brev_DK.dotm";
string targetName = System.IO.Path.ChangeExtension(templateName, "docm");
Document doc = new Document(templateName);
doc.Save(targetName, SaveFormat.Docm);

Regards
Thomas Bargholz

Hi
Thanks for your inquiry. I think, you should just specify OOXMLCompliance:
https://reference.aspose.com/words/net/aspose.words.saving/ooxmlcompliance/
Here is code example:

Document doc = new Document("in.docx");
OoxmlSaveOptions opt = new OoxmlSaveOptions(SaveFormat.Docx);
opt.Compliance = OoxmlCompliance.Iso29500_2008_Transitional;
doc.Save("out.docx", opt);

Best regards.

That did the trick. Thanks :slight_smile:
Regards
Thomas

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

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