How to update TOC field using .NET

Hi

Whether aspose objects help me to update the table of contents of the word document.

Hi Nandini,

Thanks for your query. Yes, you can update the table of contents by using Aspose.Words. Please use the following code snippet to update table of contents in a document and read following documentation link for your kind reference.

Document  doc = new
Document(MyDir + “in.doc”);

// This updates all fields in the document.

doc.UpdateFields();

doc.Save(MyDir + "AsposeOut.doc");

Please let us know if you have any more queries.