Forum


Replies: 5   Views: 3097
Generating toc using templates and embedhtml
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@wotbot.com.au  · 30-10-2017 - 13:42

Here's what I did,

On creating the template:

1.) Added the toc placeholder by going to Words' References>Add table of contents on page 1.
2.) Added the variable $CONTENTS$ on page 2

On generating the document:

1.) I loaded the template created above.
2.) I used `replaceVariableByHTML` to substitute the $CONTENTS$, the html has h1 tags in them.
 

But the generated document didnt update the TOC section.
Am I doing something wrong ?