Outlook) (AutoFormatRule.Standard 屬性
會傳回 Boolean 值,指出 AutoFormatRule 物件是否代表內建 Outlook 格式化規則。 唯讀。
語法
expression。 Standard
表達 代表 AutoFormatRule 物件的 變數。
註解
如果這個屬性的值設定為 True,則無法變更 AutoFormatRule 物件的 Filter 及 Name 屬性。 同樣地,您無法使用AutoFormatRules集合的Remove方法來刪除內建的 Outlook 格式化規則,也無法使用AutoFormatRules集合的Insert方法,在該集合所包含的內建 Outlook 格式化規則上方或之間插入自訂格式化規則。
範例
下列的 Visual Basic for Applications (VBA) 範例會列舉目前 TableView 物件的 AutoFormatRules 集合,停用集合中所包含的任何自訂格式化規則。
Private Sub DisableCustomAutoFormatRules()
Dim objTableView As TableView
Dim objRule As AutoFormatRule
' Check if the current view is a table view.
If Application.ActiveExplorer.CurrentView.ViewType = olTableView Then
' Obtain a TableView object reference to the current view.
Set objView = Application.ActiveExplorer.CurrentView
' Enumerate the AutoFormatRules collection for
' the table view, disabling any custom formatting
' rule defined for the view.
For Each objRule In objView.AutoFormatRules
If Not objRule.Standard Then
objRule.Enabled = False
End If
Next
' Save and apply the table view.
objView.Save
objView.Apply
End If
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。