

- WORD HOW TO CREATE TABLE OF CONTENTS IN WORD 2010 UPDATE
- WORD HOW TO CREATE TABLE OF CONTENTS IN WORD 2010 SOFTWARE
- WORD HOW TO CREATE TABLE OF CONTENTS IN WORD 2010 CODE

You can insert sections by inserting section breaks.") Sections are used to apply same formatting for a group of paragraphs. A document can contain any number of sections. Section.BreakCode = SectionBreakCode.NewPage ĪddHeading(section, BuiltinStyle.Heading2, "Section 2", "This is the built-in heading 2 style. Section = document.AddSection() as WSection Adds a new section to the Word document. This can be attained by formatting each text range in the paragraph.") A paragraph can have any number formatting. This demonstrates the paragraphs at the same level and style as that of the previous one.

A paragraph is a set of statements that gives a meaning for the text.") ĪddHeading(section, BuiltinStyle.Heading3, "Paragraph 2", "This is the built-in heading 3 style. Each section contains any number of paragraphs. You can insert sections by inserting section breaks.") ĪddHeading(section, BuiltinStyle.Heading3, "Paragraph 1", "This is the built-in heading 3 style.
WORD HOW TO CREATE TABLE OF CONTENTS IN WORD 2010 UPDATE
Please update the field or press F9 key to refresh the TOC.") ĪddHeading(section, BuiltinStyle.Heading2, "Section 1", "This is the built-in heading 2 style. MS Word refreshes the TOC field after insertion. It can refresh or update TOC field by using UpdateTableOfContents method. Note that DocIO can insert TOC field in a word document. This sample demonstrates the TOC insertion in a word document. NewPara.AppendBreak(BreakType.PageBreak) ĪddHeading(section, BuiltinStyle.Heading1, "Document with built-in heading styles", "This is the built-in heading 1 style. WParagraph newPara = section.AddParagraph() as WParagraph Adds content to the Word document with built-in heading styles. Sets the heading levels 1 through 3 to include in the TOC. TableOfContent toc = para.AppendTOC(1, 3) Para.AppendText("Essential DocIO - Table of Contents") WParagraph para = document.LastParagraph Using (WordDocument document = new WordDocument())ĭ.All = 72
WORD HOW TO CREATE TABLE OF CONTENTS IN WORD 2010 CODE
The following code example illustrates how to create and insert a table of contents for heading levels 1 through 3 in a Word document using the Syncfusion Word Library. You can programmatically create and insert a table of contents based on the built-in heading styles in a Word document by using the AppendTOC method in the WordDocument class. NET Core Word (DocIO) Library also creates a table of contents by identifying the contents that have heading styles applied, and inserts the TOC entries as links along with their page numbers.įor more information about applying paragraph styles, please refer to this documentation: Applying paragraph formatting. Microsoft Word creates the table of contents based on the document headings up to three levels (Heading 1, Heading 2, and Heading 3) by default. Let’s get started! Create and insert the table of contents with heading styles It also enables you to create, read, and edit Word documents programmatically without Microsoft Office or interop dependencies. NET library that allows you to add advanced Word document processing functionalities to any. NET Core Word (DocIO) Library is a feature-rich and high-performance. In this blog, you will learn how to create, edit, and update the table of contents in Word documents programmatically in C# using Syncfusion’s. It indicates which page number each heading is located on and links each entry in the table of contents to the corresponding heading in the document.īeing a developer, you might need to work with the table of contents programmatically. To solve this difficulty, Microsoft Word provides support to insert a table of contents (TOC) in Word documents.Ī table of contents is a heading-oriented list or outline of the Word document contents. When you create a long document with multiple headings or sections, such as project requirements, design guidelines, or user manuals, it can be difficult to understand the contents and navigate to a particular part.
WORD HOW TO CREATE TABLE OF CONTENTS IN WORD 2010 SOFTWARE
