AutoFormatType Property

Applies To

Table object.

Description

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

Can be one of the following WdTableFormat constants:

  • wdTableFormat3DEffects1
  • wdTableFormat3DEffects2
  • wdTableFormat3DEffects3
  • wdTableFormatClassic1
  • wdTableFormatClassic2
  • wdTableFormatClassic3
  • wdTableFormatClassic4
  • wdTableFormatColorful1
  • wdTableFormatColorful2
  • wdTableFormatColorful3
  • wdTableFormatColumns1
  • wdTableFormatColumns2
  • wdTableFormatColumns3
  • wdTableFormatColumns4

  • wdTableFormatColumns5
  • wdTableFormatContemporary
  • wdTableFormatElegant
  • wdTableFormatGrid1
  • wdTableFormatGrid2
  • wdTableFormatGrid3
  • wdTableFormatGrid4
  • wdTableFormatGrid5
  • wdTableFormatGrid6
  • wdTableFormatGrid7
  • wdTableFormatGrid8
  • wdTableFormatList1
  • wdTableFormatList2
  • wdTableFormatList3
  • wdTableFormatList4
  • wdTableFormatList5
  • wdTableFormatList6
  • wdTableFormatList7
  • wdTableFormatList8
  • wdTableFormatNone
  • wdTableFormatProfessional
  • wdTableFormatSimple1
  • wdTableFormatSimple2
  • wdTableFormatSimple3
  • wdTableFormatSubtle1
  • wdTableFormatSubtle2

Note Use the AutoFormat method to apply automatic formatting to a table.

See Also

AutoFormat method, UpdateAutoFormat method.

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.

If ActiveDocument.Tables.Count >= 1 Then
    If ActiveDocument.Tables(1).AutoFormatType <= 3 Then
        ActiveDocument.Tables(1).AutoFormat Format:=wdTableFormatClassic1
    End If
End If