會傳回或設定 String 值,代表針對與 ColumnFormat 物件相關聯之屬性所顯示的欄標籤與工具提示。 讀取/寫入。
語法
expression。 Label
詞 一個代表 ColumnFormat 物件的變數。
註解
如果是內建 Outlook 屬性,此屬性的預設值為該屬性已當地語系化的名稱。 如果是自訂 Outlook 屬性,此屬性的預設值為該屬性的名稱。
此屬性值只適用於至欄標題是呈現為圖示之 Outlook 屬性的工具提示。
範例
以下的 Visual Basic for Applications (VBA) 範例會遍歷目前 TableView 物件的 ViewFields 集合,顯示集合中每個 ViewField 物件的標籤與 XML 結構名稱。
Private Sub DisplayTableViewFields()
Dim objTableView As TableView
Dim objViewField As ViewField
Dim strOutput As String
If Application.ActiveExplorer.CurrentView.ViewType = _
olTableView Then
' Obtain a TableView object reference for the
' current table view.
Set objTableView = _
Application.ActiveExplorer.CurrentView
' Iterate through the ViewFields collection for
' the table view, obtaining the label and the
' XML schema name for each field included in
' the view.
For Each objViewField In objTableView.ViewFields
With objViewField
strOutput = strOutput & .ColumnFormat.Label & _
" (" & .ViewXMLSchemaName & ")" & vbCrLf
End With
Next
' Display a dialog box containing the concatenated
' view field information.
MsgBox strOutput
End If
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。