The following example sets the current view in the active explorer to Messages.
Dim myOlApp As New Outlook.Application
Dim myOlExp As Outlook.Explorer
Set myOlExp = myOlApp.ActiveExplorer
myOlExp.CurrentView = "Messages"
If you use VBScript, you do not create the Application object. This example shows how to perform the same task using VBScript.
Application.ActiveExplorer.CurrentView = "Messages"