AutoCorrectEntries.AddRichText (Word)

Creates a formatted AutoCorrect entry, preserving all text attributes of the specified range. Returns an AutoCorrectEntry object.

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

Syntax : expression.AddRichText (Name, Range)

If Selection.Type = wdSelectionNormal Then 
 AutoCorrect.Entries.AddRichText "NewText", Selection.Range 
 MsgBox "You need to select some text." 
End If


The following arguments are required:

Name (String) - The text to replace automatically with Range.

Range (Range) - The formatted text that Word will insert automatically whenever Name is typed.