CalendarView Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a view that displays Outlook items in a calendar format.
public interface class CalendarView : Microsoft::Office::Interop::Outlook::_CalendarView
[System.Runtime.InteropServices.Guid("00063099-0000-0000-C000-000000000046")]
public interface CalendarView : Microsoft.Office.Interop.Outlook._CalendarView
Public Interface CalendarView
Implements _CalendarView
- Derived
- Attributes
- Implements
Remarks
This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _CalendarView.
The CalendarView object, derived from the View object, allows you to create customizable views that allow you to display Outlook items within a calendar, in one of several different modes.
Outlook provides several built-in CalendarView objects, and you can also create custom CalendarView objects. Use the Add(String, OlViewType, OlViewSaveOption) method of the Views collection to add a new CalendarView to a Folder object. Use the Standard property to determine if an existing CalendarView object is built-in or custom.
The CalendarView object supports several different view modes, depending on the desired layout and time period in which to display Outlook items. Use the CalendarViewMode property to set the view mode, the StartField property to specify the Outlook item property that contains the start date, and the EndField property to specify the Outlook item property that contains the end date for Outlook items to be displayed.
If you set the CalendarViewMode property to any value other than olCalendarViewMonth, you can use the DayWeekFont and DayWeekTimeFont properties to configure the fonts used to display the day, date, and time labels in the view. Use the DayWeekTimeScale to configure the time scale used to display Outlook items within the view. If you set the CalendarViewMode to olCalendarViewMultiDay, you can use the DaysInMultiDayMode property to determine the number of days to display in the view.
If you set the CalendarViewMode to olCalendarViewMonth, you can use the MonthFont property to configure the fonts used to display the month and day labels and the MonthShowEndTime to indicate whether the end time for is displayed in the view.
You can also configure how Outlook items appear within the CalendarView object. Use the BoldSubjects property to indicate whether subjects for Outlook items are displayed in bold and the BoldDatesWithItems property to indicate whether dates in the Date Navigator that contain Outlook items are displayed in bold. Use the Filter property to determine which Outlook items to display in the view.
The definition for each CalendarView object is stored in Extensible Markup Language (XML) format. Use the XML property to work with the XML definition for the CalendarView object.
Use the Apply() method to apply any changes made to the CalendarView object to the current view. Use the Save() method to persist any changes made to the CalendarView object. Use the LockUserChanges property to allow or prevent changes to the user interface for the view.
You can change built-in CalendarView objects, but you cannot delete them. Use the Delete() method to delete a custom CalendarView object. Use the Reset() method to reset the properties of a built-in CalendarView object to their default values.
Properties
Application |
Returns an Application object that represents the parent Outlook application for the object. Read-only. (Inherited from _CalendarView) |
AutoFormatRules |
Returns an AutoFormatRules object that represents the set of formatting rules applicable to the CalendarView object. Read-only. (Inherited from _CalendarView) |
BoldDatesWithItems |
Returns or sets a Boolean (bool in C#) value that indicates whether days that contain Outlook items should be displayed in bold within the Date Navigator for the CalendarView object. Read/write. (Inherited from _CalendarView) |
BoldSubjects |
Returns or sets a Boolean (bool in C#) value that indicates whether the subject information for Outlook items is displayed in bold within a CalendarView object. Read/write (Inherited from _CalendarView) |
CalendarViewMode |
Returns or sets an OlCalendarViewMode that determines the current view mode of the CalendarView object. Read/write. (Inherited from _CalendarView) |
Class |
Returns an OlObjectClass constant indicating the object's class. Read-only. (Inherited from _CalendarView) |
DaysInMultiDayMode |
Returns or sets an Integer (int in C#) value that represents the number of consecutive days displayed in the CalendarView object. Read/write (Inherited from _CalendarView) |
DayWeekFont |
This object, member, or enumeration is deprecated and is not intended to be used in your code. (Inherited from _CalendarView) |
DayWeekTimeFont |
This object, member, or enumeration is deprecated and is not intended to be used in your code. (Inherited from _CalendarView) |
DayWeekTimeScale |
Returns or sets an OlDayWeekTimeScale constant that represents the scale used to represent time periods in a CalendarView object. Read/write. (Inherited from _CalendarView) |
DisplayedDates |
Returns an Object array containing strings that represent the days displayed in a CalendarView object. Read-only. (Inherited from _CalendarView) |
EndField |
Returns or sets a String (string in C#) value that represents the name of the property that ends the time duration for Outlook items displayed in the CalendarView object. Read/write. (Inherited from _CalendarView) |
Filter |
Returns or sets a String (string in C#) value that represents the filter for a view. Read/write. (Inherited from _CalendarView) |
Language |
Returns or sets a String (string in C#) value that represents the language setting for the view. Read/write. (Inherited from _CalendarView) |
LockUserChanges |
Returns or sets a Boolean (bool in C#) value that indicates whether a user can modify the settings of the view. Read/write. (Inherited from _CalendarView) |
MonthFont |
This object, member, or enumeration is deprecated and is not intended to be used in your code. (Inherited from _CalendarView) |
MonthShowEndTime |
Returns or sets a Boolean (bool in C#) value that indicates whether end times for Outlook items are displayed in the CalendarView object. Read/write. (Inherited from _CalendarView) |
Name |
Returns or sets a String (string in C#) value that represents the display name for the object. Read/write. (Inherited from _CalendarView) |
Parent |
Returns the parent Object of the specified object. Read-only. (Inherited from _CalendarView) |
SaveOption |
Returns an OlViewSaveOption constant that specifies the folders in which the specified view is available and the read permissions attached to the view. Read-only. (Inherited from _CalendarView) |
SelectedEndTime |
Returns a DateTime value that represents the end time of a selection in the CalendarView object. Read-only. (Inherited from _CalendarView) |
SelectedStartTime |
Returns a DateTime value that represents the start time of a selection in the CalendarView object. Read-only. (Inherited from _CalendarView) |
Session |
Returns the NameSpace object for the current session. Read-only. (Inherited from _CalendarView) |
Standard |
Returns a Boolean (bool in C#) value that indicates whether the CalendarView object is a built-in Outlook view. Read-only. (Inherited from _CalendarView) |
StartField |
Returns or sets a String (string in C#) value that represents the name of the property that starts the time duration for Outlook items displayed in the CalendarView object. Read/write. (Inherited from _CalendarView) |
ViewType |
Returns an OlViewType constant that indicates the view type of the view. Read-only. (Inherited from _CalendarView) |
XML |
Returns or sets a String (string in C#) value that specifies the XML definition of the view. Read/write. (Inherited from _CalendarView) |
Methods
Apply() |
Applies the CalendarView object to the current view. (Inherited from _CalendarView) |
Copy(String, OlViewSaveOption) |
Creates a new View object based on the existing CalendarView object. (Inherited from _CalendarView) |
Delete() |
Deletes an object from a collection. (Inherited from _CalendarView) |
GoToDate(DateTime) |
Changes the date used by the current view to display information. (Inherited from _CalendarView) |
Reset() |
Resets a built-in Microsoft Outlook view to its original settings. (Inherited from _CalendarView) |
Save() |
Saves the view, or saves the changes to a view. (Inherited from _CalendarView) |