TextInput Property Example

This example protects the active document for forms and deletes the contents of the form field named "Text1."

ActiveDocument.Protect Type:=wdAllowOnlyFormFields
ActiveDocument.FormFields("Text1").TextInput.Clear

If the first form field in the active document is a text form field that accepts regular text, this example sets the contents of the form field.

Set myField = ActiveDocument.FormFields(1)
If myField.Type = wdFieldFormTextInput And _
    myField.TextInput.Type = wdRegularText Then
    myField.Result = "Hello"
End If