ReplacementList Method
Applies To
AutoCorrect object.
Description
Returns the array of AutoCorrect replacements.
Syntax
expression.ReplacementList(Index)
expression Required. An expression that returns an AutoCorrect object.
Index Optional Variant. The row of the array of AutoCorrect replacements to be returned. The row is returned as a one-dimensional array with two elements: The first element is the text in column 1, and the second element is the text in column 2. If Index is out of range, this method fails.
If Index is not specified, this method returns a two-dimensional array. Each row in the array contains one replacement, as shown in the following table.
Column | Contents |
|
1 | The text to be replaced |
2 | The replacement text |
Remarks
Use the AddReplacement method to add an entry to the replacement list.
See Also
AddReplacement method, DeleteReplacement method.
Example
This example searches the replacement list for "Temperature" and displays the replacement entry if it exists.
repl = Application.AutoCorrect.ReplacementList
For x = 1 To UBound(repl)
If repl(x, 1) = "Temperature" Then MsgBox repl(x, 2)
Next