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.
Installation Instructions
- Prerequisites: Ensure you have .NET installed on your machine.
- Install Aspose.Words:
- Use NuGet Package Manager Console:
Install-Package Aspose.Words
- Or, search for “Aspose.Words” in the NuGet Package Manager GUI.
- Use NuGet Package Manager Console: