Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

We have a Word document with multiple TOCs. We can also create multiple TOCs using DocIO. However, calling UpdateTableOfContents to populate/refresh these results in the links for the last TOC overwriting the links in earlier TOCs. Note that the text and page numbers are correct, but the hyperlinks. The code is minimal.

WordDocument document = new WordDocument(@"C:\TFS\AVR\Samples\TOC-Minimal.docx", FormatType.Docx);

document.UpdateTableOfContents();

document.Save(@"C:\TFS\AVR\Samples\TOC-Minimal-Processed.docx", FormatType.Docx);

document.Close();


Consider the attached documents. TOC-Minimal was created in Word. The "Section C" link navigates to section C and the "Section F" hyperlink navigates to section F, as expected. TOC-Minimal-Processed was generated using the above code. The "Section C" hyperlink now points to section F. The links for the second TOC have overwritten those for the first TOC. 

We have a document with 5 TOCs (not attached due to confidentiality) and the 5th TOC's hyperlinks overwrite those in the other 4 TOCs.