Skip to content

Latest commit

 

History

History
43 lines (24 loc) · 1.48 KB

f792a5f3-0d1c-06de-a030-7a588ca372d2.md

File metadata and controls

43 lines (24 loc) · 1.48 KB

Table.ApplyAutoFormat Method (Publisher)

Applies automatic built-in table formatting to a specified table.

Syntax

expression. ApplyAutoFormat( AutoFormat, TextFormatting, TextAlignment, Fill, Borders)

_expression_A variable that represents a Table object.

Parameters

Name Required/Optional Data Type Description
AutoFormat Required PbTableAutoFormatType The type of automatic formatting to apply to the specified table.
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.

Remarks

The AutoFormat parameter can be one of the PbTableAutoFormatType constants declared in the Microsoft Publisher type library.

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