![]() This is because the TOC field has been inserted but is not yet populated until it’s updated in the document. Without the methods used in the example, when you open the output document, you would find the TOC field, but with no visible content. The following code example shows how to insert a Table of Contents (TOC) into a document using heading styles as entries. The following code example shows how to insert a Table of Contents field into a document: You can either use that guide obtain the correct switches or if you already have a document containing the similar TOC that you want you can show field codes ( ALT+F9) and copy the switches directly from the field. Descriptions of these switches as well as a list of supported switches can be found later in the article. The default switches that are used in a TOC inserted in Microsoft Word are “\o “1-3 \h \z \u”. ![]() The field switches that you pass to the method control the way the table is built and displayed in your document. You can insert a TOC (table of contents) field into the document at the current position by calling the InsertTableOfContents method.Ī table of contents in a Word document can be built in a number of ways and formatted using a variety of options. Insert Table of Contents Programmatically How to remove an entire TOC field along with all entries form the document.How to modify the styles and appearance of the table of contents.Specify switches to control the formatting and overall structure f the TOC.Update new or existing TOCs in the document.Using Aspose.Words you can insert your own table of contents or completely rebuild existing table of contents in the document using just a few lines of code. This article outlines how to work with the table of contents field and demonstrates: ![]() Often you will work with documents containing a table of contents (TOC). Remove Table of Contents from the Document.Use Switches to Control Table of Contents Behavior.Insert Table of Contents Programmatically.Aspose.Total Product Family Aspose.Words Product Solution Aspose.PDF Product Solution Aspose.Cells Product Solution Aspose.Email Product Solution Aspose.Slides Product Solution Aspose.Imaging Product Solution Aspose.BarCode Product Solution Aspose.Diagram Product Solution Aspose.Tasks Product Solution Aspose.OCR Product Solution Aspose.Note Product Solution Aspose.CAD Product Solution Aspose.3D Product Solution Aspose.HTML Product Solution Aspose.GIS Product Solution Aspose.ZIP Product Solution Aspose.Page Product Solution Aspose.PSD Product Solution Aspose.OMR Product Solution Aspose.PUB Product Solution Aspose.SVG Product Solution Aspose.Finance Product Solution Aspose.Drawing Product Solution Aspose.Font Product Solution Aspose.TeX Product Solution ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |