Compartilhar via


TextInput.Clear Method

Word Developer Reference

Deletes the text from the specified text form field.

Syntax

expression.Clear

expression   Required. A variable that represents a TextInput object.

Example

This example protects the document for forms and deletes the text from the first form field if the field is a text form field.

Visual Basic for Applications
  ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
If ActiveDocument.FormFields(1).Type = wdFieldFormTextInput Then
    ActiveDocument.FormFields(1).TextInput.Clear
End If

See Also