(Outlook) 的 CardView.Standard 屬性
會傳回 Boolean 值,指出 CardView 物件是否代表內建 Outlook 檢視。 唯讀。
語法
expression。 Standard
表達 代表 CardView 物件的變數。
註解
只有當這個屬性的值設定為True時,才能在檢視上使用Reset方法。
範例
下列 Visual Basic for Applications (VBA) 範例會使用Standard屬性列舉目前Folder物件的Views集合,以判斷View物件是否為內建 Outlook 檢視。 如果 View 物件是內建的 Outlook 檢視,此範例會呼叫 Reset 方法,將檢視重設為其預設設定。 否則,範例會使用 Delete 方法來刪除檢視。
Private Sub RemoveAllViewCustomization()
Dim objView As View
' Enumerate each View object in the Views collection
' of the current Folder object.
For Each objView In Application.ActiveExplorer.CurrentFolder.Views
' If the View object is a built-in Outlook view, reset
' the view to its default settings. If the View object
' is a custom view, delete it.
If objView.Standard Then
objView.Reset
Else
objView.Delete
End If
Next
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。