傳回 ViewFont 物件,代表在 TableView 物件中顯示欄標題時所使用的字型。 唯讀。
語法
expression。 ColumnFont
運算式 代表 TableView 物件的變數。
範例
下列 VBA (Visual Basic for Applications) 範例遞增從目前 TableView 物件的 ColumnFont 屬性傳回的 ViewFont 物件 Size 屬性值。
Private Sub IncreaseColumnFontSize()
Dim objTableView As TableView
If Application.ActiveExplorer.CurrentView.ViewType = _
olTableView Then
' Obtain a TableView object reference for the
' current table view.
Set objTableView = _
Application.ActiveExplorer.CurrentView
' Increment the Size property of the
' ViewFont object obtained from the
' ColumnFont property, but only
' if the font is less than 24 points
' in size.
If objTableView.ColumnFont.Size < 24 Then
objTableView.ColumnFont.Size = _
objTableView.ColumnFont.Size + 1
' Save the table view.
objTableView.Save
End If
End If
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。