Reset Method

Microsoft Outlook Visual Basic

expression.Reset

expression    Required. An expression that returns an object in the Applies To list.

Remarks

This method works only on built-in Outlook views.

Example

The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example resets all built-in views in the user's Inbox to their original settings. The Standard property is returned to determine if the view is a built-in Outlook view.

Sub ResetViews()
'Resets all standard views in the user's Inbox

    Dim olApp As Outlook.Application
    Dim objName As Outlook.NameSpace
    Dim objViews As Outlook.Views
    Dim objView As Outlook.View
        
    Set olApp = New Outlook.Application
    Set objName = olApp.GetNamespace("MAPI")
    Set objViews = objName.GetDefaultFolder(olFolderInbox).Views
    For Each objView In objViews
        If objView.Standard = True Then
            objView.Reset
        End If
    Next objView

End Sub