Reset 方法

       

将内置的 Microsoft Outlook 视图重置为原始设置。

expression.Reset

expression  必选。该表达式返回“应用于”列表中的一个对象。

说明

此方法仅应用于内置 Outlook 视图。

示例

以下示例将用户“收件箱”的所有内置视图重置成原始设置。返回 Standard 属性确定视图是否为 Outlook 内置视图。

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

    Dim olApp As Outlook.Application
    Dim objName As NameSpace
    Dim objViews As Views
    Dim objView As View
        
    Set olApp = 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