返回 Views 集合。Views 集合的每个 View 对象定义了项目在浏览器中显示的方式。
expression.Views
expression 必选。该表达式返回“应用于”列表中的一个对象。
以下示例创建 Views 集合的实例,并返回名为“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).Views
'Return a view called Table View
Set objView = objViews.Item("Table View")
End Sub