AddReplacement Method

Applies To

AutoCorrect Object.

Description

Adds an entry to the array of AutoCorrect replacements. This method is available only in Microsoft Excel for Windows 95.

Syntax

object.AddReplacement(what, replacement)

object

Required. The AutoCorrect object.

what

Required. A string specifying the text to be replaced. If this string already exists in the array of AutoCorrect replacements, the existing substitute text is replaced by the new text.

replacement

Required. A string specifying the text to be substituted.

See Also

DeleteReplacement Method, ReplacementList Property.

Example

This example substitutes the word "Temp." for the word "Temperature" in the array of AutoCorrect replacements.


With Application.AutoCorrect
    .AddReplacement "Temperature", "Temp."
End With