Word) (Table.AutoFormatType 屬性
會傳回已套用至指定表格的自動格式設定類型。 唯讀的 Long。
語法
expression。 AutoFormatType
表達 代表 'Table' 物件的變數。
註解
此屬性可以是 WdTableFormat 常數之一。 使用 AutoFormat 方法套用至表格的自動格式設定。
範例
本範例會在目前格式為 [簡單 1]、[簡單 2] 或 [簡單 3] 時,將使用中文件內的第一個表格格式化為使用 [古典 1 自動格式設定]。
If ActiveDocument.Tables.Count >= 1 Then
If ActiveDocument.Tables(1).AutoFormatType <= wdTableFormatSimple3 Then
ActiveDocument.Tables(1).AutoFormat _
Format:=wdTableFormatClassic1
End If
End If
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。