View.ViewType Property (Outlook)
Office 2013
Published: July 16, 2012
Returns an OlViewType constant representing the view type of a View object. Read-only.
The following Visual Basic for Applicatons (VBA) example displays the name and type of all views in the user's Inbox.
Sub DisplayViewMode()
'Displays the names and view modes for all views
Dim objName As Outlook.NameSpace
Dim objViews As Outlook.Views
Dim objView As Outlook.View
Dim strTypes As String
Set objName = Application.GetNamespace("MAPI")
Set objViews = objName.GetDefaultFolder(olFolderInbox).Views
'Collect names and view types for all views
For Each objView In objViews
strTypes = strTypes & objView.Name & vbTab & vbTab & objView.ViewType & vbCr
Next objView
'Display message box
MsgBox "Current Inbox Views and Viewtypes:" & vbCr & _
vbCr & strTypes
End Sub