Export (0) Print
Expand All

ColumnFormat.Label Property (Outlook)

Returns or sets a String value that represents the column label and tooltip displayed for the property to which the ColumnFormat object is associated. Read/write.

Version Added: Outlook 2007

expression .Label

expression A variable that represents a ColumnFormat object.

For built-in Outlook properties, the default value for this property is the localized name of the property. For custom Outlook properties, the default value for this property is the name of the property.

The value of this property applies only to the tooltip for Outlook properties in which the column header is represented as an icon.

The following Visual Basic for Applications (VBA) example iterates through the ViewFields collection of the current TableView object, displaying the label and XML schema names of each ViewField object in the collection.

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 = _ 
 ' 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 
 ' Display a dialog box containing the concatenated 
 ' view field information. 
 MsgBox strOutput 
 End If 
End Sub 

© 2015 Microsoft