CalendarView.DayWeekTimeFont Property

Outlook Developer Reference

Returns a ViewFont object that represents the font used when displaying the hour portion of the time headers in a specified day for the CalendarView object. Read-only.

Version Information
 Version Added:  Outlook 2007

Syntax

expression.DayWeekTimeFont

expression   A variable that represents a CalendarView object.

Remarks

The value of this property also represents the font used to display the Tasks header when the CalendarViewMode property of the CalendarView object is set to either olCalendarViewDay, olCalendarViewMultiDay, olCalendarViewWeek, or olCalendarView5DayWeek.

Bb208163.vs_note(en-us,office.12).gif  Note
Setting the Size property value of the ViewFont object for this property has no effect, because the font size for the hour portion of the time headers is automatically set by Outlook based on the the size of the font specified in the DayWeekFont property of the CalendarView object.

Example

The following Visual Basic for Applications (VBA) example configures the current CalendarView object to show a single day, using an 8-point Verdana font to display items and a 16-point Verdana font to display time values and the Tasks header within the view.

Visual Basic for Applications
  Sub ConfigureDayViewFonts()
    Dim objView As CalendarView
    
    ' Check if the current view is a calendar view.
    If Application.ActiveExplorer.CurrentView.ViewType = _
        olCalendarView Then
        
        ' Obtain a CalendarView object reference for the
        ' current calendar view.
        Set objView = _
            Application.ActiveExplorer.CurrentView
            
        With objView
            ' Set the calendar view to show a
            ' single day.
            .CalendarViewMode = olCalendarViewDay
        ' Set the DayWeekFont to 8-point Verdana.
        .DayWeekFont.Name = "Verdana"
        .DayWeekFont.Size = 8
        
        ' Set the DayWeekTimeFont to 16-point Verdana.
        .<strong>DayWeekTimeFont</strong>.Name = "Verdana"
        .DayWeekTimeFont.Size = 16
        
        ' Save the calendar view.
        .Save
    End With
End If

End Sub

See Also