Hello Jason,
I would like to know if it is possible while adding a paragraph to a docx, add also a comment to a specific word within the paragraph.
Could you please help me with that?
Thank you,
MariaJ
It is currently Sun Dec 29, 2024 6:14 am
File templateZip = new File("resources/doctest.docx")
WordprocessingMLPackage template = WordprocessingMLPackage.load(templateZip)
def map = ["pagebreak": "<w:r><w:br w:type=\"page\"/></w:r>"]
template.mainDocumentPart.variableReplace(map)
if (template.isGenerateToc()) {
Toc.setTocHeadingText("Inhaltsverzeichnis");
TocGenerator tocGenerator = new TocGenerator(wordPackage);
tocGenerator.generateToc(2, " TOC \\o \"1-3\" \\h \\z \\u ", true);
}
Total posts 10113 • Total topics 2844 • Total members 2075