View.Reset Method (Outlook)
Resets a built-in Microsoft Outlook view to its original settings.
Syntax
expression .Reset
expression A variable that represents a View object.
Remarks
This method works only on built-in Outlook views.
To properly reset the current view, you must do a View.Reset and then a View.Apply. The code sample below illustrates the order of the calls:
Sub ResetView()
Dim v as Outlook.View
' Save a reference to the current view object
Set v = Application.ActiveExplorer.CurrentView
' Reset and then apply the current view
v.Reset
v.Apply
End Sub
Example
The following Microsoft 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 objName As Outlook.NameSpace
Dim objViews As Outlook.Views
Dim objView As Outlook.View
Set objName = Application.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