Outlook) (TimelineView.MaxLabelWidth 屬性
會傳回或設定 Long 值,代表 Outlook 項目之標籤在 TimelineView 物件中的最大長度 (以字元為單位)。 讀取/寫入。
語法
expression。 MaxLabelWidth
表達 代表 TimelineView 物件的變數。
註解
這個屬性可以設定為從 0 到 132 範圍的值。 如果這個屬性設定為小於 0 的值,則屬性會設定為 0。 如果將這個屬性的值設定為高於 132,該屬性就會設定為 132。 此屬性的預設值為 80。
如果此屬性設定為 0,Outlook 項目的標籤將不會顯示在檢視中。
範例
下列的 Visual Basic for Applications (VBA) 範例將目前的 TimelineView 物件設定為依月份顯示 Outlook 項目,且在時間表刻度的下方顯示週數標籤,而標籤的長度不超過 40 個字元。
Private Sub ConfigureMonthTimelineView()
Dim objTimelineView As TimelineView
If Application.ActiveExplorer.CurrentView.ViewType = _
olTimelineView Then
' Obtain a TimelineView object reference for the
' current timeline view.
Set objTimelineView = _
Application.ActiveExplorer.CurrentView
' Configure the TimelineView object so that it displays
' Outlook items by month and week, displaying labels
' no larger than 40 characters for Outlook items
' displayed in the view.
With objTimelineView
' Display items by month.
.TimelineViewMode = olTimelineViewMonth
' Display week numbers. If this value is
' set to False when TimelineViewMode is
' set to olTimelineViewMonth, the day
' numbers are displayed instead.
.ShowWeekNumbers = True
' Display labels for Outlook items
' while TimelineViewMode is set to
' olTimelineViewMonth.
.ShowLabelWhenViewingByMonth = True
' Show no more than the first 40 characters
' for each Outlook item in the view.
.MaxLabelWidth = 40
' Save and apply the view.
.Save
.Apply
End With
End If
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。