I have added a Content Control around the Toc in the Word template.
But when executing the following code (Docx4j version 3.3.1)
- Code: Select all
TocGenerator tocGenerator = new TocGenerator(wordMLPackage);
tocGenerator.updateToc(false, true);
I get this error:
org.docx4j.toc.TocException: No ToC content control found
at org.docx4j.toc.TocGenerator.updateToc(TocGenerator.java:494)
Is this related to the fact that we don't use the professional version of Docx4J?
But if so, I would expect a "better" error message.
Or does this have another ...