TableOfContents.TableID Property (Word)

Returns or sets a one-letter identifier that's used to build a table of contents from TOC fields. Read/write String .


expression. TableID

expression Required. A variable that represents a 'TableOfContents' collection.


This property corresponds to the \f switch for a TOC field. For example, "T" builds a table of contents from TOC fields using the table identifier T.


This example inserts a TOC field with an "A" identifier after the selection in Sales.doc. The first table of contents is then formatted to compile "A" entries.

Documents("Sales.doc").TablesOfContents.MarkEntry _ 
 Range:=Selection.Range, _ 
 Entry:="Hello", TableID:="A" 
With Documents("Sales.doc").TablesOfContents(1) 
 .TableID = "A" 
 .UseFields = True 
 .UseHeadingStyles = False 
End With

See also

TableOfContents Object