Hello in
new Year(
"2009") ;-)
If I need create an macro-enabled document, I do something like this:
- Code: Select all
WordprocessingMLPackage wmlPack = WordprocessingMLPackage.createPackage();
wmlPack.getMainDocumentPart().setContentType(new ContentType(ContentTypes.WORDPROCESSINGML_DOCUMENT_MACROENABLED));
wmlPack.save(new File("withMacro.docm"));
My problem is, that in file .xml I expect this:
<Override PartName="/word/document.xml" ContentType="application/vnd.ms-word.document.macroEnabled.main+xml" />
, but in real I find there this:
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" />
What I am doing wrong, please?
Thank you very much.