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)
Usage
Dim Name As String
Dim Range As Range
Dim returnValue As AutoCorrectEntry
Dim autoCorrectEntries1 As AutoCorrectEntries
returnValue = autoCorrectEntries1.AddRichText(Name, Range)
Syntax
Function AddRichText( _
<InAttribute()> ByVal Name As String, _
<InAttribute()> ByVal Range As Range _
) As AutoCorrectEntry
AutoCorrectEntry AddRichText(
[In] string Name,
[In] Range Range
);
public: AutoCorrectEntry^ AddRichText(
String^ Name,
Range^ Range
);
public AutoCorrectEntry AddRichText(
/*in*/System.String Name,
/*in*/Range Range
);
function AddRichText(
Name : String,
Range : Range
) : AutoCorrectEntry;
Parameters
- Name
The formatted text that Microsoft Word will insert automatically whenever Name is typed.
- Range
The text to replace automatically with Range.
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.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000
Target Platforms
See Also
Reference
AutoCorrectEntries Interface
Microsoft.Office.Interop.Word Namespace