Is it possible to update the TOC (TableOfContents) of a Word document generated with Syncfusion's DocIO lib?

前端 未结 1 1664
青春惊慌失措
青春惊慌失措 2020-12-18 05:56

Our application generates a Word document using Syncfusion\'s DocIO libs. Basically, we load a template and insert into it specific texts in specific bookma

相关标签:
1条回答
  • 2020-12-18 06:20

    Try this

    Document wordDocument;
    Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application(); 
    wordDocument = word.Documents.Open(saveFileDialog.FileName);
    wordDocument.TablesOfContents[1].Update();
    wordDocument.Save();
    word.Quit();
    
    0 讨论(0)
提交回复
热议问题