Updates a Table of Contents.
Use the UpdateTableOfContentsCommand command to update the Table of Contents after Table of Contents entries have been changed (for example, new headings have been added or existing headings have been modified or deleted).
Note that since the table of contents is actually the TOC field, you can use the FieldCollection.Update method to update all fields in a document including the Table of Contents. Another approach is to iterate through all fields in a document to find a field with a Field.CodeRange starting with the ‘TOC’ and call its Field.Update method. Consider this technique instead of the UpdateTableOfContentsCommand command when working with a non-visual RichEditDocumentServer instance.