AutoCorrect.Entries 属性 (Word)

返回表示当前自动更正条目列表的 AutoCorrectEntries 集合。

语法

expression。 Entries

表达式 表示“自动更正”对象的变量。

备注

此列表对应于“自动更正”对话框中“自动更正”选项卡上的自动更正条目列表。 只读。 有关返回集合中单个成员的信息,请参阅返回集合中的对象。

示例

本示例显示“自动更正”词条总数。

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

另请参阅

自动更正对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。