[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
    [Collapse]Field Codes
    [Expand]Format Switches
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Spell Checking
    AutoCorrect Feature
    Track Changes
    Mail Merge
    Restrictions and Protection
   [Expand]Visual Elements
    Keyboard Shortcuts
    HTML Tag Support
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com



Non-MailMerge field

{ TOC [ switches ] }

Switch Description
Without switches the table of contents is built upon styles with set outline levels. Outline levels assigned to individual paragraphs are disregarded unless the \u switch is specified.
\b Includes entries only from the portion of the document marked by the bookmark named by text in this switch's field-argument.
\h Inserts table of contents entries as hyperlinks.
\n "LEVELSTART-LEVELEND" Omits page numbers from the table of contents. Page numbers are omitted from all levels unless a range of entry levels is specified. For example, { TOC \n 1-1 } omits page numbers from level 1.
\u Uses the applied paragraph outline level.
\o "LEVELSTART-LEVELEND" Builds a table of contents from paragraphs with specified outline levels. For example, { TOC \o "1-3" } lists only paragraphs with outline levels 1 through 3.
\t "STYLE,LEVEL, STYLE,LEVEL,..." Builds a table of contents from paragraphs formatted with specified styles. For example, {TOC \t"Title,1,subtitle,2,customtitle,3"} builds a table of contents from paragraphs formatted with the styles "Title", "subtitle" and "customtitle". The number after each style name indicates the entry level corresponding to that style.
\c "SEQ FIELD IDENTIFIER" Builds a table of contents from items that are numbered by SEQ fields. The sequence identifier designated by text in this switch's field-argument shall match the identifier in the corresponding SEQ field.
\s "SEQ FIELD IDENTIFIER" For entries numbered with a SEQ field, adds a prefix to the page number. The prefix depends on the type of entry.
\d "SEPARATOR SYMBOL" When used with \s, defines the separator between sequence and page numbers. The default separator is a hyphen (-).
\f "TC IDENTIFIER" Builds a table of contents from TC fields. TC field identifier must exactly match the text in this switch's field-argument.
\l "LEVELSTART-LEVELEND" Used with \f key. Includes TC fields that assign entries to one of the specified levels.

Is this topic helpful?​​​​​​​