Programming Microsoft Outlook and Microsoft Exchange, Second Edition (DV-MPS Programming)

[Previous] [Next]

The Views collection contains one or more views for a ContainerRenderer object. The Views collections allows you to access existing views on your folders or to create new, dynamic views for your web applications. The following section describes the methods and properties for the View collection.

Views Collection Method

The only method for the Views collection is the Add method. This method creates and returns a new TableView or CalendarView object. The Add method takes one required parameter and three optional parameters:

The following code shows an example of the Add method being used:

Set oView = oCRenderer.Views.Add( "New View", 1) Set oColumns = oView.Columns oColumns.Add "Subject", CDOPR_SUBJECT, 20, 0, 99 oColumns.Add "Delivery Time", _ CDOPR_MESSAGE_DELIVERY_TIME, 10, 0, 99 oColumns.Add "Submit Time", CDOPR_CLIENT_SUBMIT_TIME, 10, 0, 99 oColumns.Add "Sender Name", CDOPR_SENDER_NAME, 15, 0, 99 oColumns.Add "<IMG SRC=urgent.gif>", CDOPR_IMPORTANCE, 1, 0, 99 oColumns.Add "READ RECEIPT!", _ CDOPR_READ_RECEIPT_REQUESTED, 10, 0, 0

Views Collection Properties

Two properties of the Views collection are Count and Item. The Count property returns the number of View objects in the collection. The Item property returns a specific CalendarView or TableView object from the collection. You can specify either an index or a name to the Item property.

Категории