Create a Word Document with Table of Contents

This example demonstrates how to use Aspose.Words for .NET to create a Word document that includes an interactive Table of Contents (TOC) generated using the DocumentBuilder class. The code illustrates how to insert headings of various levels, format them, and save the resulting document as a .docx file. Follow the steps below for an easy implementation.


Copy
// Code example
Step/Step

Installation Instructions

  1. Prerequisites: Ensure you have .NET installed on your machine.
  2. Install Aspose.Words:
    • Use NuGet Package Manager Console:
      Install-Package Aspose.Words
      
    • Or, search for “Aspose.Words” in the NuGet Package Manager GUI.

Also See

Aspose.Word for .NET Documentation

Aspose.Word for .NET References