Updating the fields on a TOC that was loaded from a docx file results in “NO TABLE OF CONTENTS ENTRIES FOUND”.
The source code is:
Document docWord = new Document("ERROR.docx");
docWord.updateFields();
docWord.updatePageLayout(); //If we remove this line the error persists
docWord.save("ERROR_2.docx");
I attach the docx file converted to PDF (the forum doesn’t allow to upload docx filesERROR.pdf (12.2 KB)
).