Created attachment 36684 [details] Example Code DOCM/DOCX conversion Here is some example code to be able to add a macro from an existing docm document to an existing docx document and change the type to docm. new DocumentConverter(docxFile).toDocm(macroDocmFile, outputDocmFile); And also some code to remove the macro from a docm document and convert it to a docx document. new DocumentConverter(docmFile).toDocx(outputDocxFile); Tested with POI 4.1 (with ooxml-schema 1.4) and Word 2016.