Forum


Replies: 11   Views: 4933
Addtablecontents in a specific page
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 admin  · 20-07-2016 - 07:50

Hello,

Please send to contact[at]phpdocx.com these files: doc1.docx, doc2.docx and indice.docx 

About updating a TOC, you can't force Word to update it (Word security block this kind of actions). You can ask Word to update the TOC when you open the document using this line:

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

but it will work only on some versions/installations of Word. You can use a macro as well.

Regards.