public void applyBindings() throws Docx4JException { // A component can apply in both the main document part, // and in headers/footers. See further // http://forums.opendope.org/Support-components-in-headers-footers-tp2964174p2964174.html getHyperlinkResolver().activateHyperlinkStyle(wordMLPackage); applyBindings(wordMLPackage.getMainDocumentPart()); // Add headers/footers RelationshipsPart rp = wordMLPackage.getMainDocumentPart() .getRelationshipsPart(); for (Relationship r : rp.getRelationships().getRelationship()) { if (r.getType().equals(Namespaces.HEADER)) { applyBindings((HeaderPart) rp.getPart(r)); } else if (r.getType().equals(Namespaces.FOOTER)) { applyBindings((FooterPart) rp.getPart(r)); } } }
getHyperlinkResolver().activateHyperlinkStyle(wordMLPackage);
getHyperlinkResolver().activateHyperlinkStyle(wordMLPackage);
public void applyBindings() throws Docx4JException { // A component can apply in both the main document part, // and in headers/footers. See further // http://forums.opendope.org/Support-components-in-headers-footers-tp2964174p2964174.html getHyperlinkResolver().activateHyperlinkStyle(wordMLPackage); applyBindings(wordMLPackage.getMainDocumentPart()); // Add headers/footers RelationshipsPart rp = wordMLPackage.getMainDocumentPart() .getRelationshipsPart(); for (Relationship r : rp.getRelationships().getRelationship()) { if (r.getType().equals(Namespaces.HEADER)) { applyBindings((HeaderPart) rp.getPart(r)); } else if (r.getType().equals(Namespaces.FOOTER)) { applyBindings((FooterPart) rp.getPart(r)); } } }