Entries Property Example

This example displays the total number of AutoCorrect entries.

MsgBox AutoCorrect.Entries.Count

This example deletes the specified AutoCorrect entry 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