expression.ApplyAutoFormat(AutoFormat, TextFormatting, TextAlignment, Fill, Borders)
expression Required. An expression that returns one of the objects in the Applies To list.
AutoFormat Required PbTableAutoFormatType. The type of automatic formatting to apply to the specified table.
PbTableAutoFormatType can be one of these PbTableAutoFormatType constants. |
pbTableAutoFormatCheckbookRegister |
pbTableAutoFormatCheckerboard |
pbTableAutoFormatDefault |
pbTableAutoFormatList1 |
pbTableAutoFormatList2 |
pbTableAutoFormatList3 |
pbTableAutoFormatList4 |
pbTableAutoFormatList5 |
pbTableAutoFormatList6 |
pbTableAutoFormatList7 |
pbTableAutoFormatListWithTitle1 |
pbTableAutoFormatListWithTitle2 |
pbTableAutoFormatListWithTitle3 |
pbTableAutoFormatMixed |
pbTableAutoFormatNone |
pbTableAutoFormatNumbers1 |
pbTableAutoFormatNumbers2 |
pbTableAutoFormatNumbers3 |
pbTableAutoFormatNumbers4 |
pbTableAutoFormatNumbers5 |
pbTableAutoFormatNumbers6 |
pbTableAutoFormatTableOfContents1 |
pbTableAutoFormatTableOfContents2 |
pbTableAutoFormatTableOfContents3 |
TextFormatting Optional Boolean. True to apply font formatting to the text in the table. Default value is True.
TextAlignment Optional Boolean. True to apply text alignment to the text in the table. Default value is True.
Fill Optional Boolean. True to apply fill formatting to cells in the table. Default value is True.
Borders Optional Boolean. True to apply borders to cells in the table. Default value is True.
Example
This example applies the checkbook register automatic formatting, with fill and borders, to the specified table.
Sub ApplyAutomaticTableFormatting()
ActiveDocument.Pages(1).Shapes(1).Table.ApplyAutoFormat _
AutoFormat:=pbTableAutoFormatCheckbookRegister, _
Borders:=False
End Sub