Share via


Table.AutoFormatType Property

Word Developer Reference

Returns the type of automatic formatting that's been applied to the specified table. Read-only Long.

Syntax

expression.AutoFormatType

expression   A variable that represents a Table object.

Remarks

This property can be one of the WdTableFormat constants. Use the AutoFormat method to apply automatic formatting to a table.

Example

This example formats the first table in the active document to use the Classic 1 AutoFormat if the current format is Simple 1, Simple 2, or Simple 3.

Visual Basic for Applications
  If ActiveDocument.Tables.Count >= 1 Then
    If ActiveDocument.Tables(1).AutoFormatType <= wdTableFormatSimple3 Then
        ActiveDocument.Tables(1).AutoFormat _
            Format:=wdTableFormatClassic1
    End If
End If

See Also