Hi Jason,
Does the mailmerger class handle mailing labels where merge fields are defined multiple times in one docx? Something like a 33 up avery label.
Thanks,
Jeff
It is currently Tue Apr 08, 2025 11:06 pm
public void replaceTitle(String headerString) throws JAXBException{
String xpath = "//w:r[w:t[contains(text(),'#Dokumentname')]]";
List<Object> list = mainDocumentPart.getJAXBNodesViaXPath(xpath, true);
for (Object obj : list) {
List<Object> objContent=((R)obj).getContent();
objContent.clear();
WordParagraph p = new WordParagraph(headerString);
objContent.add(p.getP());
}
}
String xpath = "//w:r[w:t[contains(text(),'audith')]]";
List<Object> list = documentPart.getJAXBNodesViaXPath(xpath, true);
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();
mdp.addStyledParagraphOfText("NormalIndent", "The following PHP error occurs: "); // here i want preserve the whitespace with setSpace("preserve"), but how?
Total posts 10157 • Total topics 2857 • Total members 2087