Views Collection

[Previous] [Next]

The CalendarView object represents a view on the Messages collection for a calendar folder. Use this object only on folders for which you know there are only AppointmentItem objects. If other types of objects exist in the folders, the CalendarView object will try to render them as appointment items. The CalendarView object inherits all the functionality of the TableView object. The following section outlines all the methods and properties for the CalendarView object.

CalendarView Object Methods

The following sections describe the methods of the CalendarView object.

RenderAppointments Method

The RenderAppointments method renders AppointmentItem objects in the Messages collection. This method takes two optional parameters. The first parameter is a vbDate data type that specifies the starting date from which to render appointments. If a time portion is specified, it is ignored. The default value is the current date.

The second optional parameter is the Response object to which you are rendering the appointments. Usually, the second parameter is the built-in ASP Response object.

RenderDateNavigator Method

The RenderDateNavigatorMethod renders a date navigator so that users can select a date. This method takes three optional parameters. The first parameter is a vbDate data type that specifies that starting date for the date navigator. The default value for this parameter is the current date. The second parameter is a Long data type that specifies the number of months to render in the navigator. The default value for this parameter is 2. The final parameter is the Response object you want to render the date navigator to.

The RenderDataNavigator method generates an HTML table. Each day contains a URL calling a JavaScript function named gotoDate. The frame containing the date navigator must define and implement this function. The following code renders a date navigator starting in October and continuing for 6 months:

     dt = Cdate("10/1/1998")     objView.RenderDateNavigator dt, 6, Response

RenderEvents Method

The RenderEvents method renders the events for a Messages collection. This method takes two optional parameters. The first parameter is a vbDate data type that specifies the starting date from which to render events. The second parameter is the Response object to render the events to. The following example renders the events for the current day:

     dt = CDate(Now)     objView.RenderEvents dt, Response

CalendarView Object Properties

The following sections describe the properties of the CalendarView object.

BusyCell Property

The BusyCell property returns or sets a pattern string for rendering an appointment. This property applies only when the Mode property of the view is CdoModeCalendarDaily. The default value for the BusyCell property for a daily view is this:

     <td rowspan=%apptlength% colspan=%apptwidth% bgcolor=ffffff     VALIGN="TOP" align=left width=%percentwidth%%value%</td>

BusyIndicator Property

The BusyIndicator property returns or sets the HTML string for rendering the busy indicator bar. The default value for this property—a thin, vertical column—is shown here:

     <td rowspan=%apptlength% colspan=1 bgcolor=0000ff     width=%percentwidth%>&nbsp;</td>

Columns Property

The Columns property returns either a single Column object or a Columns collection. To retrieve an individual Column object, you can pass in the index of the Column object you want to retrieve.

FreeBusinessCell Property

The FreeBusinessCell property returns or sets the HTML string for rendering a free time slot. The default value for this property for a daily view is this:

     <td rowspan=%apptlength% colspan=%apptwidth% bgcolor=ffffff     VALIGN="TOP" align=left width=%percentwidth%><br></td>

FreeIndicator Property

The FreeIndicator property returns or sets the HTML string for rendering the free time indicator bar. This property is valid only for a calendar view in the CdoModeCalendarDaily mode. The default value for this property is this:

     <td rowspan=%apptlength% colspan=1 bgcolor=ffffff     width=%percentwidth%>&nbsp;</td>.

FreeNonBusinessCell Property

The FreeNonBusinessCell property returns or sets the HTML string for rendering a free time slot outside of business hours. The default value for this property in a daily view is this:

     <td rowspan=%apptlength% colspan=%apptwidth% bgcolor=c0c0c0     VALIGN="TOP" align=left width=%percentwidth%><br></td>.

For a weekly view, the default value is <tr>.

Interval Property

The Interval property returns or sets, as a Long, the length of a time slot in minutes. The default value for this interval is 30 minutes. This property must be a value from 5 through 60 that can be divided integrally into 60. This property is valid only when the Mode property is CdoModeCalendarDaily.

Mode Property

The Mode property returns or sets the time unit for the CalendarView. The values for this property can be CdoModeCalendarDaily (0) or CdoModeCalendarWeekly (1). The default value for this property is CdoModeCalendarDaily.

Name Property

The Name property returns the display name of the CalendarView object.

NumberOfUnits Property

The NumberOfUnits property returns or sets the number of time units to display in the rendered HTML page. This property defaults to 1.

OOFIndicator Property

This property returns or sets the HTML string indicating how to render the out-of-office indicator bar. This property is valid only when the CalendarView object's Mode property is CdoModeCalendarDaily. The default value for this property is this:

     <td rowspan=%apptlength% colspan=1 bgcolor=660066     width=%percentwidth%>&nbsp;</td>

Source Property

The Source property returns the type of the current CalendarView. The values returned by this property can be CdoViewCommon (0) or CdoViewCustom (2).

TenativeIndicator Property

This property returns or sets the HTML string to use when rendering the tentative indicator bar. This property is valid only when the Mode property of the CalendarView is CdoModeCalendarDaily. The default value for this property is this:

     <td rowspan=%apptlength% colspan=1 bgcolor=99ccff     width=%percentwidth%>&nbsp;</td>



Programming Microsoft Outlook and Microsoft Exchange
Programming Microsoft Outlook and Microsoft Exchange, Second Edition (DV-MPS Programming)
ISBN: 0735610193
EAN: 2147483647
Year: 2000
Pages: 184

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net