AutoCorrectEntries.AddRichText Method

Creates a formatted AutoCorrect entry, preserving all text attributes of the specified range.

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

Syntax

'Declaration
Function AddRichText ( _
    Name As String, _
    Range As Range _
) As AutoCorrectEntry
'Usage
Dim instance As AutoCorrectEntries
Dim Name As String
Dim Range As Range
Dim returnValue As AutoCorrectEntry

returnValue = instance.AddRichText(Name, _
    Range)
AutoCorrectEntry AddRichText(
    string Name,
    Range Range
)

Parameters

  • Name
    Type: System.String
    The formatted text that Microsoft Word will insert automatically whenever Name is typed.

Return Value

Type: Microsoft.Office.Interop.Word.AutoCorrectEntry

Remarks

The RichText property for entries added by using this method returns True. If this method isn't used, inserted AutoCorrect entries conform to the current style.

See Also

Reference

AutoCorrectEntries Interface

AutoCorrectEntries Members

Microsoft.Office.Interop.Word Namespace