germarat.blogg.se

Microsoft word options to fill in form
Microsoft word options to fill in form






  1. #Microsoft word options to fill in form how to
  2. #Microsoft word options to fill in form code

Press ALT+F11 to open the Visual Basic Editor (VB Editor or just VBE). I used one uncommon but very handy DateAndTimePicker control for entering the birthday.

  • There are two command button controls used to process or cancel the form.
  • I used a frame control to group the survey questions.
  • Students use the CTRL key and mouse to select multiple items in the list.
  • The "Sports Program" control is a multi-select ListBox.
  • Students can select an item from the list or write in their own entry.
  • The "Favorite Food" control is a single item ComboBox.
  • This prevents the wisenheimer student from entering a teacher that doesn't exist.
  • The "Favorite Teacher" control is ComboBox control with the MatchRequired property set to true.
  • The "Favorite Subject" control is a single item select ListBox.
  • Checkbox controls are used for "Personal Items.".
  • OptionButton controls are provided for students to define "Gender.".
  • A spin button control is associated with the "Age" textbox.
  • The "Address" control is Textbox control with the MultiLine property set to true.
  • The "Name, Address, Age, and Phone Number" controls are Textbox controls.
  • In this Userform I have included most of the common Userform controls. The Userform for the Student Survey form is shown below:
  • The resulting Userform is presented as a graphical user interface and serves to collect and in certain cases validate student responses to the survey questions.
  • The Userform object is where the Userform is actually designed.
  • #Microsoft word options to fill in form code

    The standard code module contains the code for initiating the Userform and processing Userform contents and other functions.Note: While not demonstrated here, Content Controls introduced with Word 2007 are excellent place marker/data stores in document templates.Īfter you create your template and enter the DocVariable fields and bookmark it is time to open the Visual Basic Editor (VBE) to create a standard code module and Userform object. Enter the bookmark using the Insert Tab>Link>Bookmark ribbon sequence (Word 2007/2010) or the Insert>Bookmarks menu sequence (Word 2003).As an alternative, or you can create DocVariable fields manually by typing then selecting the field code text and pressing CTRL+F9 (e.g.DocVariable fields can be inserted using the Insert Tab>QuickParts>Field>DocVariable ribbon sequence (Word 2007/2010) or Insert>Field>DocVariable menu sequence (Word 2003).For more on Repeating data and populating fields see my: Repeating DataĮnter the boiler plate text (e.g., form labels, headings, etc.) and the DocVariable fields and/or bookmarks as required.When using bookmarks, you can repeat the bookmarked data at other places in your document using REF fields.I want to illustrate a method for putting data "in" a bookmark instead of "at" a bookmark as was shown in the MVP FAQ article.The exception is that I will use a bookmark for the "Address" information. The data in that field will be formatted to match the "D" in "DocVariable. Note the DocVariable field located in the template header.This lets you add different formatting to the text at each DocVariable field. You can take advantage of using the \*CharFormat in the DocVariable fields.Document variables and DocVariable fields are easier to code.On Doug's suggestion, with one exception, I am departing from an often used practice of using bookmarks as place marker\data stores in the document and will use document variables and DocVariables fields instead. As the template contains a VBA project you must use a macro enabled (.dotm extension) template with Word 2007/2010.

    microsoft word options to fill in form

    Note: If you are using Word 2003 you will use a.

    #Microsoft word options to fill in form how to

    If you don't know what a template is or if you need help creating one see Word MVP Suzanne Barnhill's: How to Create a Template The template when a opened in Word 2010 with field codes displayed is shown in the illustration below.

    microsoft word options to fill in form

  • A Userform to provide a graphical user interface with the students preparing the form.
  • A standard VBA code module initialization and processing code.
  • A bookmark for one specific data element (Address field).
  • DocVariable fields placed at "most" locations where data entered by students in the Userform will be placed.
  • The boilerplate text of the Student Survey.
  • It contains lots of information on userforms in general that you won't want to miss.įor this section I am going to create a demonstration template with a Userform for a "Student Survey" form. Note: Even if you are interested in the Content Control Method, be sure to review this section as well. For a method using content controls with Word 2013, 2010 and a limited bases 2007, see Content Control Method. The first section of this tips page provides methods which are universal to all current Word versions (2003, 2007, 20). In this Microsoft Word Tips & Microsoft Word Help page I will show you how to create and employ a document template and Userform.








    Microsoft word options to fill in form