_AutoFormatRules.Insert Method

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

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Function Insert ( _
    Name As String, _
    Index As Object _
) As AutoFormatRule
'Usage
Dim instance As _AutoFormatRules
Dim Name As String
Dim Index As Object
Dim returnValue As AutoFormatRule

returnValue = instance.Insert(Name, Index)
[DispIdAttribute()]
AutoFormatRule Insert(
    string Name,
    Object Index
)

Parameters

  • Index
    Type: System.Object

    Either the index number at which to insert the new object, or a value used to match the Name property value of an object in the collection at where the new object is to be inserted.

Return Value

Type: Microsoft.Office.Interop.Outlook.AutoFormatRule
An AutoFormatRule object that represents the new formatting rule.

Remarks

This method cannot be used to insert custom formatting rules between or ahead of built-in formatting rules.

Duplicate names for AutoFormatRule objects are allowed in the AutoFormatRules collection. A maximum of 25 custom formatting rules can be added to the collection. Built-in formatting rules are not counted against that limit.

See Also

Reference

_AutoFormatRules Interface

_AutoFormatRules Members

Microsoft.Office.Interop.Outlook Namespace