AutoCorrect Property

Applies To

Application object, Global object.

Description

Returns an AutoCorrect object that contains the current AutoCorrect options, entries, and exceptions. Read-only.

See Also

Add method (AutoCorrectEntries collection), Entries property, ReplaceText property.

Example

This example adds an AutoCorrect replacement entry. After this code runs, every instance of "sr" that's typed in a document will automatically be replaced with "Stella Richards."

AutoCorrect.Entries.Add Name:= "sr", Value:= "Stella Richards"
This example deletes the specified AutoCorrect entry it if it exists.

myValue = InputBox("Enter the AutoCorrect entry to delete.")
For Each anEntry in AutoCorrect.Entries
    If anEntry.Name = myValue Then
        myMatch = True
        myConfirm = MsgBox("Are you sure you want to delete " & _
            anEntry.Name, 4)
    If myConfirm = vbYes Then
            anEntry.Delete
        End If
    End If
Next anEntry
If myMatch <> True Then
    MsgBox "There was no AutoCorrect entry: " & myValue
End If