![]() Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback. If myField.Type = wdFieldFormTextInput And _ Set myField = ActiveDocument.FormFields(1) 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. You can also control the default entry, the length of the entry, and. This example protects the active document for forms and deletes the contents of the form field named "Text1." ActiveDocument.Protect Type:=wdAllowOnlyFormFieldsĪctiveDocument.FormFields("Text1").TextInput.Clear The Solution: For a text form field, you can control what the user enters to some extent by specifying the type of text ('Regular text,' 'Number,' 'Date,' 'Current date,' 'Current time,' or 'Calculation') in the Type drop-down list in the Text Form Field Options dialog box. Use the Result property with the FormField object to return or set the contents of a TextInput object, as follows: Example If the TextInput property is applied to a FormField object that isn't a drop-down form field, the property won't fail, but the Valid property for the returned object will be False. SyntaxĮxpression An expression that returns a ' FormField' object. Returns a TextInput object that represents a text form field.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |