Free Support Forum -

Is it possible to parse out just the table of contents from a .doc and .docx Word document


We are using .NET 4.5, C# development environment.

Does this product (or some other that you publish) have the ability to extract the Table of Contents (TOC) from a Word document in the format .doc AND .docx?

I am just looking for a plain text representation of the TOC - I do not need all the hidden tags etc.

For example, this is what I am after:

Contents Page
Employee Handbook Issues and Updates 2
Introduction 3
Joining Our Organisation 4



My ultimate aim in asking the question above was related to finding the page number of a phrase located in a Word document.

So - can any of your software search a .doc or .docx Word document for a phrase, and then return the page number of where that phrase is located?

Thanks again,


This topic has been moved to the related forum: