Hi Champs,
I am using docx from dynamic template smart service to create dynamic document. I have few section which are dynamic in the template based on which it will either show and hide the whole section. As this section would also part of Table of contents. I want to update TOC dynamically. is it feasible with the plug in?
Regards,
Shyam
Discussion posts and replies are publicly visible
The plugin can't recalculate the Word TOC since it only does merge/substitution, not field recalculation so either open the generated .docx and press F9 (Update Table) to refresh it manually, or set w:updateFields="true" in the template's settings.xml to auto-update on open (works only if your engine preserves that setting, so verify it).
You might try to keep the table of contents dynamic too. Like as we pass rest of the data, pass table of contents to the plugin also dynamically so that for every document TOC data is generated and added to the document just like other section data.
If the plugin doesn't recalculate Word fields, generating the TOC content dynamically during document creation is probably the most reliable approach. That way the TOC always matches the sections that were actually included, without requiring users to manually fnf update fields after opening the document.