This documentation is archived and is not being maintained.

AddReplacement Method [Excel 2003 VBA Language Reference]

Office 2003

Adds an entry to the array of AutoCorrect replacements.

expression .AddReplacement(What, Replacement)

expression Required. An expression that returns an AutoCorrect object.

What   Required String. 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 String. The replacement text.

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
		


Applies to | AutoCorrect Object



Show: