Table of contents
TOC
折叠目录
展开目录

Table.ApplyAutoFormat 方法 (发布服务器)Table.ApplyAutoFormat Method (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
|
3 参与人员

对指定表格应用自动套用的内置表格格式。Applies automatic built-in table formatting to a specified table.

语法Syntax

表达式ApplyAutoFormat自动套用格式TextFormatting文本斜体文本填充边框expression. ApplyAutoFormat( AutoFormat, TextFormatting, TextAlignment, Fill, Borders)

_expression_A 表示一个对象的变量。_expression_A variable that represents a Table object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
自动套用格式AutoFormat必需RequiredPbTableAutoFormatTypePbTableAutoFormatType对指定表格应用的自动套用格式的类型。The type of automatic formatting to apply to the specified table.
TextFormattingTextFormatting可选OptionalBooleanBoolean要应用到表中的文本格式的字体。默认值为TrueTrue to apply font formatting to the text in the table. Default value is True.
文本斜体文本下划线TextAlignment可选OptionalBooleanBoolean要将文本对齐方式应用于表中的文本。默认值为TrueTrue to apply text alignment to the text in the table. Default value is True.
填充Fill可选OptionalBooleanBoolean要应用到表中的单元格的格式填充。默认值为TrueTrue to apply fill formatting to cells in the table. Default value is True.
边框Borders可选OptionalBooleanBoolean要对表中的单元格应用边框。默认值为TrueTrue to apply borders to cells in the table. Default value is True.

注解Remarks

自动套用格式参数可以是在 Microsoft 发布服务器类型库声明的PbTableAutoFormatType常量之一。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
© 2018 Microsoft