Regarding TOC

I have shared sample document to generate TOC in document format test567.docx (13.9 KB)…I have shared format document for TOC Is that possible to generate

If possible how to do in csharp code

@siva1950 Please see our documentation to learn how to work with TOC in Aspose.Words:

@alexey.noskov I have attached sample document regarding TOC .In image it shows 1 alone show separate toc.
can You help me on that which scenario it has been happend or any c# code changes should I need to change for this .

Kindly give some understandanding for Toc generated this document

@siva1950 To avoid this a paragraph break should be inserted after the TOC. Please see the following code:

builder.InsertTableOfContents("\\o \"1-3\" \\h \\z \\u");

Greeting for the day

how to read string value in word document line by line in c#

Kindly help me on this it wil be more appreciated

@siva1950 As you may know MS Word documents are flow document and do not have concept of page or line. The document consumer applications (MS Word, Open Office etc) reflows the document content into lines and pages on the fly. So there is no special “node” for line of text in MS Word documents. Please see our documentation to learn more about Aspose.Words Document Object Model:

The code provided in this topic might give you a hint how to achieve what you need:

A post was split to a new topic: How to find the string in the whole document contains H1 to H3 tag available or not