Mar 16 2020

documents4j for TOC update

documents4j can also be used to update the TOC page numbers in your docx file.

For this, there are 2 adjustments to our previous post.

The first is that you convert to(target).as(DocumentType.DOCX), not DocumentType.PDF, so you get docx output.

The second is that you need a customised word_convert.vbs containing, for example:

    ' Update TOC

This code will update the first TablesOfContents.

See further

word_convert.vbs is typically found in your documents4j-transformer-msoffice-word.jar

No Responses so far

Comments are closed.

Comment RSS