Hi All,
Is it possible to use docx4j to recreate/create a docx from a document.xml file?
Thanks
//Erik
It is currently Sat Dec 20, 2025 2:25 am
News of docx4j WordprocessingMLPackage wmlPack = WordprocessingMLPackage.createPackage();
wmlPack.getMainDocumentPart().setContentType(new ContentType(ContentTypes.WORDPROCESSINGML_DOCUMENT_MACROENABLED));
wmlPack.save(new File("withMacro.docm"));
, but in real I find there this:<Override PartName="/word/document.xml" ContentType="application/vnd.ms-word.document.macroEnabled.main+xml" />
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" />
Total posts 10216 • Total topics 2878 • Total members 2103