CalendarView.CalendarViewMode (Outlook)

Returns or sets an OlCalendarViewMode that determines the current view mode of the CalendarView object. Possible return values are olCalendarView5DayWeek - Displays a 5-day week, olCalendarViewDay - Displays a single day, olCalendarViewMonth - Displays a month, olCalendarViewMultiDay - Displays a number of days equal to the DaysInMultiDayMode property value of the CalendarView object, olCalendarViewWeek - Displays a 7-day week.


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. 
 
 .DayWeekTimeFont.Name = "Verdana" 
 
 .DayWeekTimeFont.Size = 16 
 
 
 
 ' Save the calendar view. 
 
 .Save 
 
 End With 
 
 End If 
 
End Sub