Views Object
Outlook Developer Reference |
Contains a collection of all View objects in the current folder.
Remarks
Use the Views property of the Folder object to return the Views collection. Use Views(
index
),where
index
is the object's name or position within the collection, to return a single View object.
Use the Add method of the views collection to add a new view to the collection.
Use the Remove method to remove a view from the collection.
Example
The following example returns a View object of type olTableView called Table View. Before running this example, make sure a view by the name 'Table View' exists.
Visual Basic for Applications |
---|
|
The following example adds a new view of type olIconView in the user's Notes folder.
Note |
---|
The Add method will fail if a view with the same name already exists. |
Visual Basic for Applications |
---|
|
The following example removes the above view, "New Icon View Type", from the collection.
Visual Basic for Applications |
---|
|
See Also