Table of Contents in Mail Merge

I have a Table of Contents field in my template. I also have a field in the footer (Insert, Field, Document Information, File Name, include path). The template also has mail merge fields. After merging with the database the Table of Contents and Document Information fields are unlinked. How can I retain these fields?

This message was posted using Page2Forum from Inserting a Table of Contents - Aspose.Words for .NET and Java

Hi
Thanks for your request. Unfortunately Aspose.Words can’t update TOC fields. See FAQ for more information.
As a workaround you can update field manualy or use a macro. See the following link for more information.
https://support.microsoft.com/en-us/topic/the-filename-field-does-not-automatically-update-when-you-open-a-document-in-word-de2bfb95-d990-1ced-a618-5ac0a2ec1be4
Best regards.