public class TocOperations
extends Object
This is an end-to-end example showing you how to
to add and populate a ToC, then update it.
It uses Word to populate (and/or update) the ToC,
driven by documents4j.
Since Word does the heavy lifting, the full range of
switches in the ToC instruction can be used.
For this to work, you'll need a conversion script
which instructs Word to update ToC.
A sample override script (which updates ToC) is in docx4j-samples-resources.
To use it, set the docx4j.properties key: com.documents4j.conversion.msoffice.word_convert.vbs
or you can set it programmatically using System.setProperty