TableID Property

Returns or sets a one-letter identifier that's used to build a table of contents or table of figures from TOC fields. 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. Read/write String.

expression.TableID

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

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
    .Update
End With
		

This example adds a table of figures at the beginning of the active document and then formats the table to compile "B" entries.

Set myRange = ActiveDocument.Range(Start:=0, End:=0)
Set myTOF = ActiveDocument.TablesOfFigures.Add(Range:=myRange)
With myTOF
    .UseFields = True
    .UseHeadingStyles = False
    .TableID = "B"
    .Caption = ""
End With
		
©2003 Microsoft Corporation. All rights reserved.