Hi,
i want use in my document created by template some style predefined.
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage
.load(new java.io.File(inputfilepath));
// 2. Fetch the document part
StyleDefinitionsPart stylePart = wordMLPackage.getMainDocumentPart()
.getStyleDefinitionsPart();
org.docx4j.wml.Styles styles = (org.docx4j.wml.Styles) stylePart
.getJaxbElement();
for (Iterator iter = styles.getStyle().iterator(); iter.hasNext();) {
org.docx4j.wml.Style s = (org.docx4j.wml.Style) iter.next();
if (stylePart.activateStyle(s.getStyleId())) {
System.out.println("active style value: " + s.getName().getVal();
System.out.println("active styleID: " + s.getStyleId());
} else {
System.out.println("NON ACTIVE STYLE: " + s.getName().getVal()
+ " ." ...