Hi Jason !
I'm currently trying to create a file with a macro included. I search around the web, and apparently it's impossible to add it using Open XML. They all suggested using a predefined template with the macro already included.
It is currently Sat Nov 29, 2025 10:06 pm
News of Forums
wordMLPackage = WordprocessingMLPackage.load(new java.io.File(outputfilepath));
wordMLPackage = ProcessAltChunk.process(wordMLPackage);
SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
saver.save(finaloutpath);
org.docx4j.openpackaging.parts.WordprocessingML.MetafileWmfPart cannot be cast to org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImageTotal posts 10213 • Total topics 2877 • Total members 2103