Create a new Word 2007 document to get started. Because forms are used over and over, you should save them as templates rather than documents. Click the Office button, click Save As, and choose Word Macro-Enabled Template (*.dotm) from the Save As Type drop-down list.
Content Controls
If the Developer tab isn’t showing on the Ribbon, click the Office button, click Word Options, and check mark the Show Developer Tab In The Ribbon box. Click OK. Now, click the Design Mode button in the Controls group of the Developer tab.
Placing a content control is a two-part process: You place the control and then set its properties. Click the Rich Text button in the upper left of the Controls group. A light blue area with the words “Click here to enter text” appears. To access the properties of the control, select it, and then click Properties on the Ribbon.
The type of control determines which properties will be available, but all controls have three properties in common. The Title box lets you type in the title of the control that appears at the top of the control. The Tag box is used by developers who use forms for data processing, which is beyond the scope of this article. Finally, Locking has two parts; you can prevent the content control from being deleted by the user and you can prevent the contents from being edited (so no one would be able to fill out the form—not a good option in most cases).
Now, back to our Rich Text control. Let’s say that we want the user to insert his or her last name in this field. By default, the text “Click here to enter text” appears. This is the text the user clicks and types over to insert information. Replace this text with the words “Last name,” making sure that the new text is still in the light color as the original.
The Rich Text and Text controls are very similar. The form creator can designate the style for the text for either type of control. Simply click Use A Style To Format Contents in the Content Control Properties box and then choose a style or create a new one with the New Style button. Rich Text allows multiple paragraphs, whereas Text does not, unless the form creator allows it by clicking the appropriate box in the Properties dialog box. Finally, Rich Text and Text both allow you to cause the field placeholder to be deleted after the user places text into it.
Types Of Lists
The Drop-Down List and Combo Box are also very similar. Both provide a list of choices the user chooses from. The only difference is that the Drop-Down List restricts the user to the choices the form creator defines; the Combo Box lets the user type in a choice not on the list. To add an item to a list, simply click Add in the Properties dialog box. There are two boxes here: Display Name and Value. In order for a user to select an item in a list, both fields must be completed. Word automatically fills in the Value field with the Display Name data you enter. Once you have placed items in the list, you can select it and then modify, remove, or reposition it.
The Picture Content Control is the simplest to place. The only properties to set are those for locking the content. The Date Picker control has a more complex set of Properties, but they are primarily about how you want the date displayed, for example, 3/5/2010, March 5, 2010, or 2010-03-05. Finally, the Building Blocks Gallery control lets you place AutoText, equations, tables, and more. We will cover building blocks in a future article.
See our last article in this series on forms next month when we show you how to use legacy forms, as well as how to protect your finished project.