Share via


Views Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns a Views collection. Each View object in the Views collection defines the manner in which items are displayed in an Explorer.

expression.Views

expression   Required. An expression that returns one of the objects in the Applies To list.

Example

The following example creates an instance of the Views collection and returns a view called "Table View".

`

Sub GetView()
'Returns a view object

Dim olApp As Outlook.Application
Dim objName As NameSpace
Dim objViews As Views
Dim objView As View

Set olApp = Outlook.Application
Set objName = olApp.GetNamespace("MAPI")
Set objViews = objName.GetDefaultFolder(olFolderInbox).<strong>Views</strong>
'Return a view called Table View
Set objView = objViews.Item("Table View")

End Sub

`