TextInput Object
Word Developer Reference |
Represents a single text form field.
Remarks
Use FormFields(Index), where Index is either the bookmark name associated with the text form field or the index number, to return a FormField object. Use the TextInput property with the FormField object to return a TextInput object. The following example deletes the contents of the text form field named "Text1" in the active document.
Visual Basic for Applications |
---|
|
The index number represents the position of the form field in the FormFields collection. The following example checks the type of the first form field in the active document. If the form field is a text form field, the example sets "Mission Critical" as the value of the field.
Visual Basic for Applications |
---|
|
The following example determines whether the ffield variable represents a valid text form field in the active document before it sets the default text.
Visual Basic for Applications |
---|
|
Use the Add method with the FormFields object to add a text form field. The following example adds a text form field at the beginning of the active document and then sets the name of the form field to "FirstName."
Visual Basic for Applications |
---|
|
See Also