Hi, main question here is how do I go about replacing headers and footers in a document.. I've tried a couple of different options based on the examples.
First, copying header and footer from a document with header/footer to a document with none of these
public static void copyHeaderAndFooter(String sourcefile, String targetfile) throws Exception {
WordprocessingMLPackage source;
WordprocessingMLPackage target;
if (sourcefile.endsWith(".docx")) {
try {
source = WordprocessingMLPackage.load(new File(sourcefile));
target = WordprocessingMLPackage.load(new File(targetfile));
// Find ...