Word) (Document.DefaultTableStyle 屬性
會傳回 Variant ,代表表格樣式套用至文件中的所有新建立資料表。 唯讀。
語法
expression。 DefaultTableStyle
表達 會傳回 Document 物件的運算式。
範例
此範例會檢查使用中檔內使用的預設表格樣式是否命名為 「Table Normal」,如果是,則會將預設表格樣式變更為 「TableStyle1」。本範例假設您有一個名為 「TableStyle1」 的表格樣式。
Sub TableDefaultStyle()
With ActiveDocument
If .DefaultTableStyle = "Table Normal" Then
.SetDefaultTableStyle _
Style:="TableStyle1", SetInTemplate:=True
End If
End With
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。