CalendarView.Reset Method (Outlook)

Resets a built-in Microsoft Outlook view to its original settings.

Version Added: Outlook 2007

expression .Reset

expression A variable that represents a CalendarView object.

This method works only on built-in Outlook views.

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

Sub ResetInboxViews() 
 
 
 
 Dim objName As NameSpace 
 
 Dim objViews As Views 
 
 Dim objView As View 
 
 
 
 ' Get the Views collection of the Inbox default folder. 
 
 Set objName = Application.GetNamespace("MAPI") 
 
 Set objViews = objName.GetDefaultFolder(olFolderInbox).Views 
 
 
 
 ' Enumerate the Views collection, calling the Reset 
 
 ' method for each View object with its Standard 
 
 ' property value set to True. 
 
 For Each objView In objViews 
 
 If objView.Standard = True Then 
 
 objView.Reset 
 
 End If 
 
 Next objView 
 
 
 
End Sub 
 

Show:
© 2014 Microsoft