public void UpdateToc() { Document doc = new Document(); //ExStart //ExId:UpdateTOC //ExSummary:Shows how to completely rebuild TOC fields in the document by invoking field update. doc.UpdateFields(); //ExEnd }