共用方式為


TimelineView.ShowWeekNumbers 屬性 (Outlook)

會傳回或設定 Boolean 值,指出是否在 TimelineView 物件的時間表刻度中顯示週數標籤。 讀取/寫入。

語法

expressionShowWeekNumbers

表達 代表 TimelineView 物件的變數。

註解

如果此屬性設定為 True,則在 TimelineView 物件中顯示之時間表刻度裡的週數標籤位置,將取決於 TimelineViewMode 屬性的值。

屬性值 標籤位置
olTimelineViewDay 顯示在時間表刻度的上方,成為日期標籤的開端。
olTimelineViewWeek 顯示在時間表刻度的上方,成為週標籤的開端。
olTimelineViewMonth 顯示在時間表刻度的下方,取代日標籤和日期標籤。

範例

下列的 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

另請參閱

TimelineView 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應