I've written some code, and recorded some screen-casts around adding/updating the TOC.
openxmldeveloper.org/.../exploring-tables-of-contents-in-open-xml-wordprocessingml-documents.aspx
-Eric
Hi,
thanks fo this resolve problem. But if i use this method i get the message from the Microsoft Word about update fields.
If is there any another method which update TOC without this message?
Thanks for reply.
Hi Aishi,
In that series of screen-casts, I explore several ways in which you can avoid updating the TOC without the message from Microsoft Word about updating fields. The ways that I explore are:
There is a fourth way, which is to create an AutoOpen macro and store it in the document itself. This means that you save the document as a DOCM instead of a DOCX. This approach has its own complications. I have not created a screen-cast that shows this approach.
Other than these approaches, there is no way to avoid that message.