How to update table of contents (TOC) and then convert docx file to pdf? I want to create and update table of content in docx file and then convert it to pdf, so I want this TOC to be updated in pdf file.
This code update TOC after opening docx file by user and I don't need it.
docx.enforceUpdateFields();
I want TOC to be updated automatically by my program. Thanks.