AutoFormatRule.Standard プロパティ (Outlook)

AutoFormatRule オブジェクトが組み込みの Outlook 書式設定ルールを表すかどうかを示す ブール 値を返します。 読み取り専用です。

構文

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

関連項目

AutoFormatRule オブジェクト

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。