AutoFormatRules AutoFormatRules AutoFormatRules Interface


Represents the collection of AutoFormatRule objects in a view.

public interface class AutoFormatRules : Microsoft::Office::Interop::Outlook::_AutoFormatRules
public interface AutoFormatRules : Microsoft.Office.Interop.Outlook._AutoFormatRules
Public Interface AutoFormatRules
Implements _AutoFormatRules


This is a .NET interface derived from a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this derived interface to access all method, property, and event members of the COM object. However, if a method or event you want to use shares the same name under the same COM object, cast to the corresponding primary interface to call the method, and cast to the latest events interface to connect to the event. Refer to this topic for information about the COM object. For information about the method and property members of the COM object, see _AutoFormatRules.

Use the Add(String) method or the Insert(String, Object) method of the AutoFormatRules collection to create a new formatting rule for the following objects derived from the View object:

AutoFormatRule objects contained in an AutoFormatRules collection are applied to each Outlook item in the order in which they are contained in the collection. Changes to AutoFormatRule objects are persisted only if the Save() method of the AutoFormatRules collection is called.


Add(String) Add(String) Add(String)

Creates a new AutoFormatRule object and appends it to the AutoFormatRules collection.

(Inherited from _AutoFormatRules)

Insert(String, Object) Insert(String, Object) Insert(String, Object)

Creates a new AutoFormatRule object and inserts it at the specified index within the AutoFormatRules collection.

(Inherited from _AutoFormatRules)

Remove(Object) Remove(Object) Remove(Object)

Removes an object from the collection.

(Inherited from _AutoFormatRules)

RemoveAll() RemoveAll() RemoveAll()

Removes all custom formatting rules from the AutoFormatRules collection.

(Inherited from _AutoFormatRules)

Save() Save() Save()

Save all changes to AutoFormatRule objects within the AutoFormatRules collection.

(Inherited from _AutoFormatRules)


Application Application Application

Returns an Application object that represents the parent Outlook application for the object. Read-only.

(Inherited from _AutoFormatRules)

Class Class Class

Returns an OlObjectClass constant indicating the object's class. Read-only.

(Inherited from _AutoFormatRules)

Count Count Count

Returns an Integer (int in C#) value indicating the count of AutoFormatRule objects in the specified collection. Read-only.

(Inherited from _AutoFormatRules)

Item[Object] Item[Object] Item[Object]

Returns an AutoFormatRule object from the collection.

(Inherited from _AutoFormatRules)

Parent Parent Parent

Returns the parent Object of the specified object. Read-only.

(Inherited from _AutoFormatRules)

Session Session Session

Returns the NameSpace object for the current session. Read-only.

(Inherited from _AutoFormatRules)

Applies to