返回一个 AutoCorrectEntries 集合,该集合代表当前的“自动更正”词条列表。该列表与“工具”菜单上“自动更正”对话框中“自动更正”选项卡上的“自动更正”词条列表相对应。只读。
有关返回集合中单个成员的内容,请参阅返回集合中的对象。
本示例显示“自动更正”词条总数。
MsgBox AutoCorrect.Entries.Count
本示例删除指定的原有“自动更正”词条。
Dim strEntry As String
Dim acEntry As AutoCorrectEntry
Dim blnMatch As Boolean
Dim intResponse As Integer
strEntry = InputBox("Enter the AutoCorrect entry to delete.")
blnMatch = False
For Each acEntry in AutoCorrect.Entries
If acEntry.Name = strEntry Then
blnMatch = True
intResponse = _
MsgBox("Are you sure you want to delete " _
& acEntry.Name, 4)
If intResponse = vbYes Then
acEntry.Delete
End If
End If
Next acEntry
If blnMatch <> True Then
MsgBox "There was no AutoCorrect entry: " & strEntry
End If