AutoFormatRule.Enabled property (Outlook)

Gibt zurück oder legt einen booleschen Wert, der angibt, ob die durch das AutoFormatRule -Objekt dargestellten Formatierungsregel aktiviert ist. Lese-/Schreibzugriff.

Syntax

Ausdruck. Aktiviert

Ausdruck Eine Variable, die ein AutoFormatRule-Objekt darstellt.

Beispiel

Im folgende Visual Basic für Applikationen (VBA) aufgezählt, wobei die AutoFormatRules -Auflistung für das aktuelle TableView -Objekt, jede in der Auflistung enthaltene benutzerdefinierte Formatierungsregel.

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

Siehe auch

AutoFormatRule-Objekt

Support und Feedback

Haben Sie Fragen oder Feedback zu Office VBA oder zu dieser Dokumentation? Unter Office VBA-Support und Feedback finden Sie Hilfestellung zu den Möglichkeiten, wie Sie Support erhalten und Feedback abgeben können.