We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Parse text from TOC

Thread ID:





127088 Oct 25,2016 01:28 PM UTC Oct 26,2016 12:31 PM UTC ASP.NET Web Forms 1
Tags: DocIO
Mauricio Roberto Cruz
Asked On October 25, 2016 01:28 PM UTC


I've been trying to parse all text from Table of Contents from a document I created using MSWord only.

I know I can get the TOC by checking if any ChildEntity has EntityType == EntityType.TOC, however I can't see a way to loop through all content inside a Table of Content to get texts, as I couldn't find any inside TableOfContents class.

I need to be able to extract Texts from any TOC inside a word document, but can't find a way using syncfusion.

Could you please help me on this?

- Mauricio

Sethumanikkam Yogendran [Syncfusion]
Replied On October 26, 2016 12:31 PM UTC

Hi Mauricio,

Thank you for contacting Syncfusion support.

I need to be able to extract Texts from any TOC inside a word document, but can't find a way using Syncfusion. Could you please help me on this?
Yes, you can extract Text from TOC by iterating through its elements. We have prepared a sample to meet your requirement. In this sample, we have done the following things,

1. Loaded the template Word document which has TOC inside of it.
2. Iterated TOC entries from document and found text in it.
3. Added found text in String Builder.
4. Shown the result of text in Message Box.

Please find the below sample which illustrates the same, and let us know if it helps you.

Note: Find input Word document (Template.docx) from “Data” folder inside the DocIO Application.

If we misunderstood your requirement, kindly update us requirement with clear description. Thereby we will analyze further on the mentioned requirement and update you with appropriate solution.

Please let us know if you have any other questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon