AutoCorrectEntries.AddRichText(String, Range) Method

Definition

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

public:
 Microsoft::Office::Interop::Word::AutoCorrectEntry ^ AddRichText(System::String ^ Name, Microsoft::Office::Interop::Word::Range ^ Range);
public Microsoft.Office.Interop.Word.AutoCorrectEntry AddRichText (string Name, Microsoft.Office.Interop.Word.Range Range);
abstract member AddRichText : string * Microsoft.Office.Interop.Word.Range -> Microsoft.Office.Interop.Word.AutoCorrectEntry
Public Function AddRichText (Name As String, Range As Range) As AutoCorrectEntry

Parameters

Name
String

The formatted text that Microsoft Word will insert automatically whenever Name is typed.

Range
Range

The text to replace automatically with Range.

Returns

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.

Applies to