Replies: 1   Views: 654
Table of content force uptoupdate true
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by jonas1919  · 09-11-2020 - 02:50

where can I set  by force [autoUpdate = true], before converting from docx to html I need table of content will be automatically updated. is't settings ..?

$docx2->addTableContents(array('autoUpdate' => true), $legend);

Posted by admin  · 09-11-2020 - 07:48


autoUpdate enables an internal option in the DOCX to ask the program used to open the DOCX to update the TOC (asking the user when the DOCX is opened). This options is only compatible with MS Word.

To update TOCs in DOCX documents, you need to use the conversion plugin based on LibreOffice or MS Word. To use the LibreOffice one, please check the docs folder included in the package, you need to add an use a macro.