TimelineView.ShowWeekNumbers 属性 (Outlook)
返回或设置一个 布尔 值,指示是否在周编号标签显示在时间刻度 TimelineView 对象。 读/写。
语法
expression。 ShowWeekNumbers
表达 一个代表 TimelineView 对象的变量。
备注
如果此属性设置为 True 时,在其中周编号标签显示在时间刻度 TimelineView 对象的位置取决于 TimelineViewMode 属性的值。
属性值 | 标签位置 |
---|---|
olTimelineViewDay | 显示在时间刻度上半部分中的日期标签之前。 |
olTimelineViewWeek | 显示在时间刻度上半部分中的周标签之前。 |
olTimelineViewMonth | 显示在时间刻度的下半部分中,用来替换日标签和日期标签。 |
示例
下面的 Visual Basic for Applications (VBA) 示例配置当前 TimelineView 对象按月,用一周时间刻度,下部与标签不能超过 40 个字符的数字标签显示 Outlook 项目。
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 支持和反馈,获取有关如何接收支持和提供反馈的指南。