IT Training Microsoft Word 2013™ Forms (Level 3) Contents Introduction ................................................................... 1 Creating a Form............................................................ 1 Setting Values for a Drop-Down List..................... 2 Turning Off Shading and Adding Formatting ........ 4 Activating the Form ....................................................... 4 Saving the Form as a Template.................................... 5 Checking Data Entry ..................................................... 5 Using a Table on a Form .............................................. 6 Fixing the Size of Boxes on a Form ...................... 7 Calculating Values on a Form....................................... 8 Using Macros on a Form .............................................. 9 Exporting Data from a Form ....................................... 10 Introduction A form is a special type of document in which the user can only type within certain areas. The remainder of the document is protected and cannot be modified in any way. This is precisely what is required when you want someone to fill in a questionnaire, for example. Whether the form is filled in online or printed on paper, you can arrange it so that the layout cannot be altered. When completed online, forms allow the user to move directly between the answer boxes using the Tab key. As well as being able to type in their answers, they can also click on check boxes or select from pre-set answers provided by a drop-down list. You can also check the validity of answers and can run a macro (e.g. to give additional instructions) on entering a box or on leaving it. Creating a Form Start your form on a new blank document: 1. Start-up Microsoft Word or, if Word is already running, press <Ctrl n> for a new document 2. Type in a main heading for your form - e.g. Job Application 3. Change the style to [Heading 1] and [Center] it if you prefer 4. Press <Enter> twice then type the instructions for completing the form - e.g. Please fill in the form below, clicking on the option boxes or using the drop-down lists where these are provided. (press <Enter>) 5. Display the DEVELOPER tab - move to the FILE tab, click on Options and choose Customize Ribbon then turn on Developer in the section on the right then press <Enter> for [OK] The Developer tab includes a Controls group, which are the keys to producing a form. The three buttons you need (text boxes, check boxes and drop-down list boxes) are all hiding in the Legacy Tools button . Don’t be tempted to use the ActiveX controls or the ones shown in the Controls group – these are for experts. 6. First, click on the [No Spacing] button in the Styles group on the HOME tab – this gives you the old normal paragraph style 7. Next, display the Ruler by clicking on the VIEW tab followed by clicking in the box next to Ruler in the Show group on the left of the ribbon. On the Ruler, click at the 3.5cm mark to set a left tab 8. Now type in your first question (e.g. Name:) then press <Tab> 9. Move to the DEVELOPER tab then click on the [Legacy Tools] button in the Controls group and choose the very first tool under Legacy Forms ([Text Form Field]) - a grey box will appear ready for the user to type in his/her own name 10. Press <Enter> twice then repeat steps 8 and 9 for the second question (e.g. Address:) 11. Repeat step 10 for the third question (e.g. Date of Birth:) Next, try adding check boxes (the second button in the Legacy Tools): 12. Press <Enter> twice then type the fourth question (e.g. Gender:) 13. Press <Tab> then type Male followed by three spaces 14. Click on the [Legacy Tools] button then on [Check Box Form Field] (the second button in the top row) - a small grey box appears 15. Press five spaces then type Female followed by three spaces 16. Repeat step 14 for a second check box Finally, add a drop-down list box (the third button in the Legacy Tools): 17. Press <Enter> twice and type the fifth question (e.g. Nationality:) 18. Press <Tab> then click on the [Legacy Tools] button then on [Drop-Down Form Field] (third button) - another box appears Note: Drop-down lists are only of use on a form which is being filled in online. Setting Values for a Drop-Down List To set the values you want to appear in the drop-down field: 1. Make sure the current typing position is against the drop-down box (it should already be so) 2. Click on the [Properties] button in the Controls group - a dialog box appears: 2 Tip: You can also double click on the drop-down box to display the dialog box. 3. Type in the first Drop-down item: (e.g. British) - press <Enter> or click on [Add >>] 4. Repeat step 3 for the second list item - e.g. European Community 5. Repeat step 3 for the third list item - e.g. Other Tip: The first item in a drop-down list appears as the default value. If you want to display an empty box, create an extra blank list item as the first entry in the list. You must type at least one character to create the list item (e.g. a space). Use several spaces to widen the box. Note that you can amend the list order by first selecting a list item and then using the Move arrows. A selected item can also be deleted from the list using the [Remove] button. 6. Repeat step 3 for a fourth list item, this time pressing the <spacebar> several times (about 10) 7. With the new entry selected, use the [Up] button to Move it to the top of the list 8. Next, click on [Add Help Text...] - another dialog box appears: Select the option Type your own: then type the following message in the box provided: Click on the list arrow then select your answer from those provided. 9. Click on [OK] to close the dialog box 10. Finally, make sure that the Drop-down enabled check box is ticked under Field settings then press <Enter> or click on [OK] You have now created your drop-down list. Anyone filling out the form online must select from this list they cannot type in another value. The help message will be displayed on the Status Line at the foot of the window. 3 Turning Off Shading and Adding Formatting Currently the boxes are all shaded grey. If the form is being filled in online then the shading is unnecessary; even for a printed form, it's better to provide an outlined box. It's very easy to turn off the shading: 1. Click on the [Legacy Tools] button then on [Form Field Shading] - the fifth of six in the top row The grey shading should now have disappeared. To turn it on again (if you prefer that) simply click on the [Form Field Shading] a second time. To add a format to an answer field: 2. Select the form field to be formatted then apply the formatting - e.g. select the Nationality dropdown box and press <Ctrl i> to make it italic Other formatting you might want to change includes the font (and font size) and justification (e.g. in a table, you might want numbers to line up on the right). Activating the Form Though you created a drop-down list, the form is not yet activated and so the list items do not show. A form becomes active once it has been protected. You can then only type in the form fields themselves and cannot make any changes to the existing text: 1. Click on the [Restrict Editing] button towards the right of the DEVELOPER tab – a Task Pane appears on the right This is a very powerful pane and allows you to restrict both formatting and editing to different groups of users. Here isn’t the place to go through this in detail; just follow the instructions below: 2. In step 2. Editing restrictions, turn on the option to Allow only this type of editing in the document 3. Using the drop-down box provided, set this to Filling in forms 4. Next, click on [Yes, Start Enforcing Protection] in step 3. Start enforcement (if this button is greyed out, click on the [Design Mode] button on the DEVELOPER tab) - a dialog box appears: There’s no need to set a password at this moment, so: 5. Press <Enter> for [OK] 6. Now fill out the form, pressing <Tab> to move between the fields 7. For the Address, separate each line by a comma – don’t press <Enter> 8. With a check box, either type an x (or a <space>) to set/unset it, or click on it using the mouse 4 9. Having tested out the form, click on [Stop Protection] at the foot of the task pane on the right then click on the [Legacy Tools] button then on [Reset Form Fields] (the final button in the top row - this will clear any entries you have made) 10. End by protecting the form again - click on [Yes, Start Enforcing Protection] 11. This time type in a password of job – press <Tab> 12. Type job again to confirm the password then press <Enter> for [OK] Saving the Form as a Template Forms are usually saved as templates so that each user creates a new document based on the template with all the boxes empty and waiting to be filled in. To create a template: 1. Move to the FILE tab and choose Save As 2. Click on My Documents on the right under Computer 3. Type in a File name: - e.g. Job 4. Change Save as type: to Word Template then press <Enter> for [Save] Note that templates are saved by default to a Custom Office Templates folder in Word 2013, but they can be saved to any folder. 5. 6. 7. 8. 9. Move to the FILE tab and choose New Under the search box, click on PERSONAL (instead of FEATURED) Select job - a new document is created based on the template Fill out the form (<Tab> between fields) and note that you cannot edit the existing text When you have finished, [Close] the document - there's no need to Save it You should now have returned to your template, ready to make further amendments. Checking Data Entry You can check for valid data entry in a Text Field and can specify how you want the data to appear on the form. On the current form, for example, you can check that a date is being entered against Date of Birth: 1. First you need to unprotect the form - click on the [Stop Protection] button (at the bottom of Restrict Editing pane on the right) 2. Type in your password job then press <Enter> for [OK] 3. Move the typing position to the Date of Birth: text form field (at 3.5cm) - just click on it 4. Click on the [Properties] button in the Controls group on the DEVELOPER tab 5 The following window will appear: 5. Using the list arrow attached to Type:, change this option to Date Note the other available types - you can restrict entry to numbers, for example, or can automatically set this to pick up the current date or time. 6. Using the list arrow attached to Date format:, change this option to dd MMMM yyyy 7. Press <Enter> or click on [OK] to close the Text Form Field Options dialog box This will automatically convert any date entered into a format showing the month and year in full (e.g. 25 March 2009). 8. Click on [Yes, Start Enforcing Protection] in the Restrict Editing task pane 9. When asked, don’t bother with a password this time – just press <Enter> for [OK] 10. Next, press <Ctrl s> to save the changes to the template 11. Move to the FILE tab and choose New 12. Under the search box, click on PERSONAL (instead of FEATURED) 13. Select job - a new document is created based on the template 14. Try typing help against Date of Birth then press <Tab> - an error message should appear saying A valid date or time is required 15. Press <Enter> to clear the message then type in a date in an abbreviated form (e.g. 12/5/88) then press <Tab> - it should be converted to the long format (i.e. 12 May 1988) Using a Table on a Form Using tabs to line up the boxes on a form works well, except where the answer stretches over more than a single line. To see what happens: 1. Move to the Address field and type in your address - press <Enter> at the end of each line You will find that the second line begins on the far left of the form. To overcome this, a table can be used. Some people always use a table to lay out their forms. It's relatively simple to change the current tab-delimited form into a table; there's no need to start again from scratch. 2. First, [Close] the current document (there's no need to Save it) to return to your template 3. Click on the [Stop Protection] button to unlock the form (at the bottom of Restrict Editing pane on the right) 4. Select the questions (drag through them from the Name heading to the end of the form) 5. Move to the INSERT tab, click on the [Table] button and choose Convert Text to Table... 6. Check that the Number of columns: (under Table size) is set to 2 7. At the bottom, under Separate text at, choose the option Tabs 6 8. Press <Enter> or click on [OK] 9. With the table still selected, click on the list arrow attached to the [Borders] button on the TABLE TOOLS DESIGN tab and choose [No Border] (dashed lines show rather than full lines) 10. Click anywhere within the table to release the selection highlighting Having removed all the borders from the form, you might want to reinstate some - especially if the form is to be printed out on paper. First, it's a good idea to display the gridlines and set the required box width. 11. Move to the TABLE TOOLS LAYOUT tab and check [View Gridlines] is turned on 12. Click on the Name Text Box field at 3.5cm then on the [Select] button and choose Select Cell 13. Using the mouse, drag the right border in to the required width (e.g. to 7 cm) 14. Move to the TABLE TOOLS DESIGN tab, click on the [Borders] button and choose [Outside Borders] 15. Repeat steps 11 to 14 for the Address and Date of Birth answer boxes Once you have set up the answer box borders, you can remove the table gridlines: 16. On the TABLE TOOLS LAYOUT tab, click on [View Gridlines] 17. Click on [Yes, Start Enforcing Protection] 18. When asked, don’t bother with a password this time – just press <Enter> for [OK] 19. Next press <Ctrl s> to save the template 20. Finally, create a new document based on the template, as before, and test out the new layout You will find when you enter your Address the box expands with each line under the previous one. The same would happen with any of the other text boxes if someone accidentally presses <Enter> instead of <Tab>. 21. [Close] your test document (there's no need to save it) and return to your template Fixing the Size of Boxes on a Form There's nothing more frustrating with online forms than the boxes growing in size as you type. The form then no longer fits correctly on paper if it is printed out. The problem is usually caused by the creator of the form pressing the Enter key to define the height of the box. They should have used the following method instead: 1. Click on the [Stop Protection] button to unlock your form template 2. On the TABLE TOOLS LAYOUT tab, click on [Select] then choose Select Table 3. Next, click on [Properties] then move to the Row tab The following dialog box appears: 7 4. Under Size turn on Specify height: and set it to 0.5 cm 5. Change Row height is: to Exactly then press <Enter> for [OK] 6. Next, click in the Address answer cell 7. Repeat steps 3 to 5 setting Specify height: to 2 cm You have now fixed the size of the rows. Use the alternative Row height is: setting of At least if you want a box with a minimum size. When printed on paper this will be of a fixed size, but when used online, it can expand if necessary. Try it out, for practice, if you like. 8. Click on [Yes, Start Enforcing Protection] (don’t set a password) then use <Ctrl s> to save the template 9. Create a new document based on the template and test out the new Address box 10. Finally, [Close] your test document (don't save it) and return to your template Calculating Values on a Form Forms are often used for submitting expenses. It's very easy to perform simple calculations on data entered into the form: 1. Click on the [Stop Protection] button to unlock your form template 2. 3. 4. 5. 6. 7. Click to the right of the Nationality: drop-down field, then press <Tab> for a new row Press <Tab> to move to the right cell then <Tab> again to create a new row In the left cell type Mileage: then press <Tab> to move to the right cell Move to the DEVELOPER tab, click on [Legacy Tools] then on the [Text Form Field] button Next, click on the [Properties] button and set the Type: to Number Under Field settings: make note of the Bookmark: (Text4) then turn on Calculate on exit: This Bookmark is important - it's the name you must use to reference the contents of the cell in any calculation. The Calculate on exit option will activate any formulae in which this bookmark is used. 8. Press <Enter> or click on [OK] 9. Move to the TABLE TOOLS LAYOUT tab, click on [Select] then Select Cell 10. Adjust the cell width, set justification to [Align Right] (you can use the shortcut <Ctrl r>) and add an [Outside Border] 11. Press <Tab> to move to the left cell in the next row 12. Type Travel Expenses: then press <Tab> to move to the next column 13. Repeat steps 5 and 6 but this time set the Type: to Calculation 14. In the Expression: box type =Text4*0.40 (to set the mileage rate at 40p per mile) 15. Set the Number format to £#,##0.00;(£#,##0.00) then press <Enter> or click on [OK] - £0.00 appears in the box (the format stipulates two decimal places for the pence) 16. Click on [Yes, Start Enforcing Protection] (don’t set a password) then use <Ctrl s> to save the template 17. Create a new document based on the template and test out the new field You should find that after you enter some data into the Mileage box (press <Tab>), the Travel Expenses will be calculated. 18. Finally, [Close] your test document (don't save it) and return to your template Tip: To refer to several boxes in a formula separate them by commas (e.g. =sum(Text1, Text2, Text4)). You can also refer to a column of boxes as above (e.g. =sum(above) or =average(above)). 8 Using Macros on a Form You've just seen how calculations can be performed automatically as data is entered. You can in fact create your own macro which runs either on entry to a field or as you leave it. The last addition you are going to make to your form is to create a macro to email the form back to you. Note that this section will probably not work on one of the PCs in the rooms supported by IT as an email program is not available. 1. Click on the [Stop Protection] button to unlock your form template 2. Press <Ctrl End> then <Enter> to move to the end of the form and type Click here to email back your completed form 3. Press <Tab> then click on [Legacy Tools] then the [Check Box Form Field] button 4. Move to the FILE tab and select Save As 5. Make sure Computer is selected, and then click on either the Custom Office Templates folder or the Templates (for Roaming Microsoft Templates) folder 6. Change Save as type: to Word Macro-Enabled Template – call the new file Job2 then press <Enter> for [Save] 7. Click on the [Record Macro] button in the Code group on the left of the DEVELOPER tab 8. Type email as the Macro name: (there's no need to assign it to the toolbar or keyboard) 9. Change Store macro in: to Documents Based On Job2.dotm 10. Press <Enter> or click on [OK] If you have never created a macro before then the next few steps will be something of a mystery - just follow the instructions carefully. You have just started up the Macro Recorder; this records any commands you now use or keystrokes you press, which then form the macro. 11. Move to the FILE tab, choose Share followed by Email and then choose Send as Attachment 12. In the To: box, type in your_own_email_address and change the Subject: to Job Application 13. Click on the [Send] button to send off the form 14. To end the macro click on [Stop Recording] – which was previously [Record Macro] 15. Now click on the [Properties] button 16. Under the heading Run macro on set Entry: to email then press <Enter> for [OK] Next, you need another macro to make sure someone doesn't accidentally send off an incomplete form: 17. Repeat steps 7 to 10, calling your second new macro jump 18. On the HOME tab, click on the list arrow attached to [Find] on the far right and choose Go To... 19. On the Go To tab, set Go to what: to Bookmark 20. Under Enter bookmark name:, click on the list arrow and select Text1 21. Press <Enter> or click on [Go To] then press <Esc> to [Close] the Find and Replace window 22. Finally, end the macro by clicking on the [Stop Recording] button on the DEVELOPER tab The final step is to add this macro to the last field in the table. You can't add a macro to a form field which is used in a calculation, so you have to add it to Mileage: 23. Click on the Mileage text box then press the <End> key 24. Now click on [Properties] and under Run macro on set Exit: to jump - press <Enter> or click on [OK] Now test out your macros to see what happens: 25. Click on [Yes, Start Enforcing Protection] (don’t set a password) then use <Ctrl s> to save the template 26. Create a new document based on the macro-enabled template called Job2 and fill out the form 9 27. If the email macro recorded okay, click on the Email Check Box – you may find that you have to type in your_own_email_address, change the subject and finally click on [Send] to send the form 28. Finally, [Close] your test document (don't save it) and return to your template If one of your macros didn't work it's easiest to record it again. Note that you can't record a click on the [Send] button because it's a mailer, not Word, command. To get this working you would need to write some very clever instructions in the Visual Basic editor. Note also: Special instructions are needed to create forms for use on the web. Look at either Forms and cgi scripts on the WWW or Web CMS Forms for further details. Exporting Data from a Form There are two Word options which let you save or print just the data from a form. To see these: 1. Move to the FILE tab and click on Options 2. Move to the Advanced options then scroll down to Print 3. Under the When printing this document: heading note the option Print only the data from a form 4. Scroll down to Save and under Preserve fidelity when sharing this document: note the option Save form data as delimited text file (this may be greyed out meaning that it’s not available) 5. Only turn the print option on if it is relevant for you – you may find your normal printout is affected 6. Press <Enter> for [OK] to close Word Options 7. End this session by closing any open files/templates ™ Trademark owned by Microsoft Corporation. © Screen shot(s) reprinted by permission from Microsoft Corporation. Copyright © 2015: The University of Reading Last Revised: March 2015 10
© Copyright 2025 Paperzz