UseFields Property

Microsoft Word Visual Basic

expression.UseFields

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

Example

This example formats the first table of contents in the active document to use heading styles instead of TC fields.

If ActiveDocument.TablesOfContents.Count >= 1 Then
    With ActiveDocument.TablesOfContents(1)
        .UseFields = False
        .UseHeadingStyles = True
    End With
End If
		

This example adds a table of figures after the selection and formats the table to compile entries with the "B" identifier.

Selection.Collapse Direction:=wdCollapseEnd
Set myTOF = ActiveDocument.TablesOfFigures _
    .Add(Range:=Selection.Range)
With myTOF
    .UseFields = True
    .TableId = "B"
    .Caption = ""
End With