DropCap 对象:删除首字下沉的格式。
KeyBinding 对象:从 KeyBindings 集合中删除按键组合,并将内置命令重设为默认按键组合。
ListEntries 对象:删除下拉窗体域中的所有项目。
TabStop 对象:删除指定的自定义制表位。
TextInput 对象:删除指定的文字窗体域中的文字。
expression.Clear
expression 必需。该表达式返回“应用于”列表中的一个对象。
此示例将删除活动文档第一段的第一个自定义制表符。
ActiveDocument.Paragraphs(1).TabStops(1).Clear
此示例保护文档中的窗体,并当第一个窗体域是文字型窗体域时,删除其中的文本。
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
If ActiveDocument.FormFields(1).Type = wdFieldFormTextInput Then
ActiveDocument.FormFields(1).TextInput.Clear
End If
本示例删除 Sales.doc 中名为“Colors”窗体域中的所有内容。
Documents("Sales.doc").FormFields("Colors") _
.DropDown.ListEntries.Clear
此示例取消活动文档中的首字下沉格式。
Set drop = ActiveDocument.Paragraphs(1).DropCap
If Not (drop Is Nothing) Then drop.Clear
本示例从 Normal 模板中删除 Alt+F1 按键指定方案。
CustomizationContext = NormalTemplate
FindKey(BuildKeyCode(Arg1:=wdKeyAlt, Arg2:=wdKeyF1)).Clear