how to make a form in word

Upload: abuturab-samo

Post on 10-Apr-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 How to Make a Form in Word

    1/26

    Information Services

    2007 Queens University Belfast Page 1

    Questionnaire and Form Design

    Using Microsoft Word 2007

    Produced by Information Services

    2007

  • 8/8/2019 How to Make a Form in Word

    2/26

    Information Services

    2007 Queens University Belfast Page 2

    Introduction

    This practical will introduce you to producing tables and designing a form using the applicationMicrosoft Word.

    What you will learn

    By the end of the practical you should be able to:

    Create and modify a table Create a form and set out a form within a table Use frames to set out form fields Add help text to form fields Use AutoText Entry to insert commonly used text in a form Use table AutoFormat to modify how a table displays Import data from a form to a spreadsheet Password protect form fields Use Visual Basic to create a macro for exclusive check boxes

    Approximate time

    The practical should take approximately 2.5 hours to complete.

  • 8/8/2019 How to Make a Form in Word

    3/26

    Information Services

    2007 Queens University Belfast Page 3

    Tables and Form Design Using Microsoft Word Practical 1

    This practical shows how to create a basic form in Word. The form is a company memo which

    allows the user to select the name of the person the memo will be sent to, who it is from and thedate sent. The sender can tick an urgent box if necessary and select which department the sender

    is based in. The memo uses text, check box and drop down form fields.

    Open the Word application. If the Developer tab is not shown across the top of the window:

    1. Click on the Office Button and select Word Options2. With the Popular tab selected (see figure 1), tick the box Show Developer tab in

    Ribbon (see figure 1)

    Figure 1: Show Developer Tab in Ribbon

    1. Type the following data using the same layout as below:

    Company Memorandum

    To: Date:

    From: Department:

    Subject: Urgent:

  • 8/8/2019 How to Make a Form in Word

    4/26

    Information Services

    2007 Queens University Belfast Page 4

    Word 2007 offers three types of form tools:

    1. Legacy form tools: were also available in Word 2003. These form tools can be used tocollect data from forms and save into a text file. Data from the text file can then be

    imported into a spreadsheet.

    2. Content control tools: These tools do not collect data as in the example above but maybe useful.

    3. ActiveX Controls: These tools are limited for most Word users and requireprogramming skills to use properly. Data can be recorded from responses to questions

    but ActiveX controls cannot be used to print data only or save as text file.

    To add the Legacy forms tools to the Quick Access toolbar, select the Developer tab and clickon the Legacy tools downward arrow, then right click on any of the tools and select Add

    Gallery to Quick Access Toolbar

    Figure 2: Legacy form tools

    Alternatively to select separately which tools to add, click the downward arrow beside the Quick

    Access Toolbar and select More Commands, choose Commands not in ribbon. Click therelevant tools and add.

    2. Position the cursor after the word Date:3. Select the Text FormField from the Quick Access Toolbar (if you added it), or click the

    downward arrow next to Legacy Tools to select the Text Form field.

    4. Either double click the text form field or select it and click on Properties from the Controlsgroup.

    5. From the Type drop down list, select Date (see Figure 3).6. From Date formats, choose dd MMMM yyyy (see Figure 3). Click on OK.

    Note: if the date format is not available, click into the space and add the format.

    Check Box Form Field

    Form Field Shading

    Text Form Field

    Insert Frame

    Drop Down Form Field

    Reset Form Fields

  • 8/8/2019 How to Make a Form in Word

    5/26

    Information Services

    2007 Queens University Belfast Page 5

    Figure 3: Text Form Field Date

    7. Position the cursor after the text To.From the Legacy tools (see Figure 1), click on the Drop-Down Form Field button. This will

    create a field.8. Either double click in the form field or click on properties within the Controls group.9. The Drop-Down Form Field Options box will open (see Figure 3).

    Figure 3: Drop-Down Form Field Options

  • 8/8/2019 How to Make a Form in Word

    6/26

    Information Services

    2007 Queens University Belfast Page 6

    10.In the Drop-down item box enter the name Jim Burns, then click on Add (see Figure 3)11.Also enter the following names (click on Add after each name):

    Wendy Brown, Anne Smith, Ellen McCormack, Frances Curry.

    12.To move names up or down the list, select the name and use the up or down arrows (seefigure 3). Change the Bookmark name to Employees and clickOK to close the dialog box.

    13.Create a drop down list for Department repeating the points above and enter the followingoptions: Finance, Personnel, Marketing, Administration, Sales

    14.The To field will use the same options as the From field. Select the To field and copy it.Paste it into the position after From.

    Note: Another way to insert date (if using todays date)

    1. Ensure the Insert tab is selected and click on Date & Time within the Textgroup.

    2. The Date and Time dialogue box will appear (see figure 4)3. Select the format of the date and ensure the Update automatically tick box is ticked if you

    want the date to change to the current date each time the file is opened.

    Figure 4: Date and Time

  • 8/8/2019 How to Make a Form in Word

    7/26

    Information Services

    2007 Queens University Belfast Page 7

    4. Position the cursor after the word Urgent and from the legacy form fields, select the checkbox form field.

    Add Help to the Form

    Sometimes its useful to add help text to a form, for example to tell users to select one check box

    only. You could type the information at the start of the form or add help to form fields.

    1. Double-click the form field to which you want to add Help text, i.e. the Urgent (check boxform field)

    2. Click the Add Help Text button (see Figure 5).Figure 5: Check Box form Field Options Figure 6: Form Field Help Text

    3. To display Help text in the Status bar, click the Status Bar tab, clickType your own, andthen type your help text in the box and clickOK (see Figure 6).

    4. To display Help text in a message box when a user presses F1, click the Help Key (F1) tab.Select Type your own, and then type your help text in the box (see Figure 6).

    You can also use an AutoText entry by selecting from those available or you can add your ownAutoText entry. AutoText is useful for text you will use repeatedly,

    i.e. select only one check box

    5. To add an AutoText entry, type the text you want to add. Select the text and ensure theInsert tab is selected. Click on the downward arrow next to Quick Parts (from the Textgroup) and select Save selection to Quick Part Gallery (see figure 7). The Create NewBuilding Block box will appear (see figure 8).

    6. Click the downward arrow next to Gallery and select AutoText.

  • 8/8/2019 How to Make a Form in Word

    8/26

    Information Services

    2007 Queens University Belfast Page 8

    7. Type a description and clickOK.Figure 7: Create Quick Part

    Figure 8: Create AutoText Entry

    8. To allow the fields to work, the document must be protected. With the Developer tabselected, ensure the Design Mode is turned off (Within the controls group the Design Mode is

    orange in colour when turned on).

    9. Now click on the Review tab and click the downward arrow next to Protect document10.Select Restrict Formatting and Editing (see figure 9)Figure 9: Restrict Formatting and Editing

  • 8/8/2019 How to Make a Form in Word

    9/26

    Information Services

    2007 Queens University Belfast Page 9

    11.The Restrict Formatting and Editing pane will open down the right hand side of the screen(see figure 10).

    12.Select the tick box Allow only this type of editing in the document (see figure 10)13.Click on the drop down list and select Filling in forms (see figure 10)14.Click on the button Yes, Start Enforcing Protection (see figure 10)15.You will be promoted for a password. By entering a password, users will only be able to fill

    in the form but not amend the form.

    16.Dont enter a password and clickOK17.You can now fill in the form fields in the form.Figure 10:

    18.Note to make changes to the form you will need to remove protection.19.With the Developer tab selected, ensure the Design Mode is turned off20.Click on the Review tab and click the downward arrow next to Protect document21.Select Stop Protection

  • 8/8/2019 How to Make a Form in Word

    10/26

    Information Services

    2007 Queens University Belfast Page 10

    Forms/Table Practical

    To create a form using a table for layout:

    1. Open a new blank document file and save it as PhotoCopyForm.doc on your H drive ordesktop of the computer.

    2. Type the heading Photocopying Form3. Ensure the Insert tab is selected and click on the downward arrow under table and select

    the Table menu, select Insert Table

    4. Insert a table with 1 column and 9 rows (see figure 9)

    Figure 9: Insert Table

  • 8/8/2019 How to Make a Form in Word

    11/26

    Information Services

    2007 Queens University Belfast Page 11

    Move Around In A Table

    Click in the table cell to position the insertion point. Or

    To Press

    Move to the next cell TAB (If the insertion point is in the last cell of a table,

    pressing TAB adds a new row.)

    Move to the preceding cell SHIFT+TAB

    Move to the preceding or next row UP ARROW or DOWN ARROW

    Move to the first cell in the row ALT+HOME, or ALT+7 on the numeric keypad

    Move to the last cell in the row ALT+END, or ALT+1 on the numeric keypad

    Move to the first cell in the column ALT+PAGE UP, or ALT+9 on the numeric keypad

    Move to the last cell in the column ALT+PAGE DOWN, or ALT+3 on the numeric keypad

    Start a new paragraph ENTER

    Add a new row at the bottom of

    the table

    TAB at the end of the last row

    Add text before a table at the

    beginning of a document

    ENTER at the beginning of the first cell

    Select Items In A Table

    To Do this

    Select a cell Click the left edge of the cell.

    Select a row Click to the left of the row.

    Select a column Click the column's top gridline

    or border.

    Select multiple cells,rows, or columns

    Drag across the cell, row, or column; or select a single cell, row, orcolumn, and then hold down SHIFT while you click another cell,

    row, or column.Select text in the next

    cell

    Press TAB.

    Select text in the

    previous cell

    Press SHIFT+TAB.

    Select the entire table Click the table, and then press ALT+5 on the numeric keypad. NUMLOCK must be off.

  • 8/8/2019 How to Make a Form in Word

    12/26

    Information Services

    2007 Queens University Belfast Page 12

    Tip: You can also select rows, columns, or the entire table by clicking in the table and then

    using the Select commands on the Table menu. Note: Use the toolbars in Word to format text ina table, i.e., Bold, Centre, Underscore, Font colour, etc. Also use copy, paste, etc.

    1. Click into the table. Notice the two new tabs that have appeared across the top of theribbon (Design and Layout). See figure 11 showing the ribbon with the Design tab

    selected and figure 12 with the Layout tab selected. Select the first row of the table and

    from the Layout tab, select Merge Cells.

    2. Click the top row of the table and from the Layout tab, select Split Cells. Select 2columns and 1 row (see Figure 13).

    Note below the table tools in the ribbon with Design and Layout tabs. See figure 11 with Designtab selected and Figure 12 with Layout tab selected.

    Figure 11: Table Tools (Design)

    Figure 12: Table Tools (Layout)

    Figure 13: Split Cells

    Border Launcher

    Design tabTable Tools

    Layout tab

  • 8/8/2019 How to Make a Form in Word

    13/26

    Information Services

    2007 Queens University Belfast Page 13

    3. Select the second row and split the cell into 3 columns.4. Repeat point 3 above for rows 3 and 4.5. Split row 5 into 2 columns.6. Adjust the size of the first cell in row 5 so that it is two thirds of the width of the table by

    selecting the line between the cells and dragging it to the right see Figure 11).

    7. Split row 6 and 7, into 3 columns, row 8 into 4 columns and row 9 into 3 columns.8. Click on the select table tab (top left hand corner of the table), or from the Layout tab

    click on the downward arrow next to Select and select Select Table (see figure 14).

    9. Click the Layout tab and change the cell size to 1 cm by typing 1 into the row heightcontrol (see figure 15). The table should look similar to figure 16.

    Figure 14: Select Table Figure 15: Row Height

    Figure 16: Blank Table

  • 8/8/2019 How to Make a Form in Word

    14/26

    Information Services

    2007 Queens University Belfast Page 14

    There are a range of built in formatting styles available for tables in Word. To apply one to your

    table, select the table in the document and ensure the Design tab is selected. Click the downwardarrow to the right of table styles to bring up the full list (see figure 17). Click on the style to

    select it.

    Figure 17: Table Styles

  • 8/8/2019 How to Make a Form in Word

    15/26

    Information Services

    2007 Queens University Belfast Page 15

    10.Select the table and with the Design tab selected, click on the downward arrow next toborders. Select All Borders (see figure 18)

    Figure 18: Borders

    You are now going to type text and insert form fields into the cells in the table.

    11.Enter the text into the table as shown in Figure 19. Add additional line spacing ifnecessary.

  • 8/8/2019 How to Make a Form in Word

    16/26

    Information Services

    2007 Queens University Belfast Page 16

    Figure 19: Table Example Text (without form fields)

    REQUEST FOR DIGITAL PHOTOCOPYING FORMThis form should be completed and e-mailed to thePhotocopying Department

    JOB NUMBER:

    NAME: DEPARTMENT: DELIVERY ADDRESS:

    TEL NO: DEPARTMENTMENTAL

    CHARGE CODE:

    DATE REQUIRED:

    PAPER SIZE

    REQUIRED:

    NO. SIDES TO BE

    COPIED:

    NO. OF COPIES REQUIRED:

    DOUBLE SIDED WILL BE PRINTED UNLESS

    OTHERWISE STATEDTICK HERE FOR SINGLE SIDED:

    PAPER COLOUR: CARD COLOUR: COVERS:

    BINDING: FOLDING:Yes No

    STAPLING:Yes No

    DRILLING:

    Yes No

    LAMINATION:

    Yes No

    PADS:

    Yes No

    GUILLOTINE:

    Yes No

    SPECIAL

    INSTRUCTIONS:

    We recommend that you

    request a proof before

    printing.

    Please indicate here if

    proof required:

    Yes No

    DELIVERY/COLLECTION:

    Deliver by Print Services van

    Print Services opening hours:

    Mon-Thu 8 am-4.30pm

    Fridays 8-1 pm

    12.Click in the first row, second cell (JOB NUMBER), and enter a Text Form Field. In theText Form Field Options box make the Type: Number and Maximumlength9

    (see Figure 20).

  • 8/8/2019 How to Make a Form in Word

    17/26

    Information Services

    2007 Queens University Belfast Page 17

    Figure 20: Text Form Field Options

    13.On the second row, under NAME, DEPARTMENT AND DELIVERY ADDRESS, enterText fields and set Type to Regular.

    14.The first and second cells in the third row (TEL NO. AND DEPARTMENTALCHARGE CODE) will have Number type Text fields. DATE REQUIRED will have a

    Date type Text field.

    15.On the fourth row PAPER SIZE REQUIRED will be a Drop-down form field with theentries A4, A5 and A3. NO. SIDES TO BE COPIED will be a Drop-down form fieldwith the entries 1 and 2. NO. OF COPIES REQUIRED will be a Text form field using

    Number type text.

    16.Cell one in the fifth row will have a Check box form field and the second cell will havea Drop-down form field with the entries Black and white and Colour.

    17.Under PAPER COLOUR and CARD COLOUR on the sixth row there will be a Drop-down form field with the entries White, Blue, Red, Pink, Yellow, Green (create one,then copy and paste). The COVERS cell will also have a Drop-down form field with the

    entries None, ClearAcetate, Clearfront and Card.

    18.The seventh row will have a Drop-down form field under BINDING with the entriesNone Required, Wire plastic, Wire metal, Plastic Strip. FOLDING AND STAPLING

    will have two Check boxes, one for Yes and one for No.

    19.The four cells in the eighth row will have two Check box form fields - one for Yes andone for No.

    20.In the last row, the first cell should have a Text form field and the middle cell will havetwo Check box form fields with Yes and No options.

  • 8/8/2019 How to Make a Form in Word

    18/26

    Information Services

    2007 Queens University Belfast Page 18

    21.Go back and add Help Text to each of the form fields, either to show on the status bar orwhen the user selects F1 on the keyboard.

    22.Protect the form and save it using the name DigitalCopyingForm23.The completed form should look similar to Figure 21.

    Figure 21: Complete Table

    REQUEST FOR DIGITAL PHOTOCOPYING FORM

    This form should be completed and e-mailed to the

    Photocopying Department

    JOB NUMBER:

    NAME: DEPARTMENT: DELIVERY ADDRESS:

    TEL NO. DEPARTMENTMENTALCHARGE CODE:

    DATE REQUIRED

    PAPER SIZE REQUIREDA4

    NO. SIDES TO BECOPIED 1

    NO. OF COPIES REQUIRED

    DOUBLE SIDED WILL BE PRINTED UNLESSOTHERWISE STATED

    TICK HERE FOR SINGLE SIDED

    Black and white

    PAPER COLOUR:White

    CARD COLOUR:White

    COVERS:None

    BINDING

    None Required

    FOLDING

    Yes No

    STAPLING:

    Yes No

    DRILLING:

    Yes No

    LAMINATION:

    Yes No

    PADS:

    Yes No

    GUILLOTINE:

    Yes No

    SPECIALINSTRUCTIONS:

    We recommend that yourequest a proof before

    printing.

    Please indicate here if

    proof required:

    Yes No

    DELIVERY/COLLECTION:Deliver by Print Services van

    Print Services opening hours:

    Mon-Thu 8 am-4.30pmFridays 8-1 pm

  • 8/8/2019 How to Make a Form in Word

    19/26

    Information Services

    2007 Queens University Belfast Page 19

    Import data from a Form into a Spreadsheet

    5. Open the form PhotoCopyForm.docx that you created earlier.6. Click on the Office button and select WordOptions7. Select Advanced from the left (see figure 22). Scroll down and tick the box Save Form

    data as a delimited text file. (under the heading Preserve fidelity when sharing thisdocument - see figure 23)

    8. To print data only from a form, repeat point 6 above and tick the box Print only the datafrom a form (see figure 22)

    Note: The two options below (print only data from a form and save data as a delimited text

    file only work with the legacy form fields as per 2003 (used above). Both are accessed fromWord Options (Advanced tab).

    Figure 22: Print Data only from a form

    Figure 23: Save data only from forms as a text file

  • 8/8/2019 How to Make a Form in Word

    20/26

    Information Services

    2007 Queens University Belfast Page 20

    9. Now work through the form, completing each form field (the form will need to be lockedto allow you to complete it). Note you can use the tab key on the keyboard to move

    through the fields

    10. Select save from the file menu. Notice the type of file is Text File as only the data fromthe form fields will be saved (see figure 24)

    Figure 24: Save Form (text file)

    11. A File Conversion dialog box will appear, with a preview of your information youselected in the form (See figure 25)

    12. ClickOK and save to your H driveFigure 25: File Conversion

  • 8/8/2019 How to Make a Form in Word

    21/26

    Information Services

    2007 Queens University Belfast Page 21

    Prepare Spreadsheet

    13. Open the Excel spreadsheet application and save the spreadsheet asDataFromPhotoCopyForm14. Ensure the cursor is position in cell A1 of the worksheet (see figure 26)Figure 26:

    15. Ensure the Data tab is selected and click on From Text (from Get External Data group)(see figure 27).

    16. Browse to where you saved the file (your H drive or desktop) see figure 2817. Click on ImportFigure 27: Import Data

    Figure 28: Select Data Source

    18. Step 1 of the Text Import Wizard will appear (see figure 29).19. Under Original data type, select Delimited Characters such as commas or tabs

    separate each field (see figure 29).

    20. Start Import at row 1, do not change File origin. (Note if you had typed headings in rowone, you would start import at row 2). Select Next.

  • 8/8/2019 How to Make a Form in Word

    22/26

    Information Services

    2007 Queens University Belfast Page 22

    21. Step 2 of the Text Import Wizard will appear (see figure 30)22. Select Comma as the delimiter and click on Next (see figure 30)Figure 29: Step 1 of the Text Import Wizard

    Figure 30: Step 2 of the Text Import Wizard

    At this point you can remove any columns you dont want. In this instance leave all and select

    Next, then select Finish. The Import Data box will appear suggesting the cell to start input of

    the data (see figure 31). Select OK. The data will be imported into the spreadsheet.

  • 8/8/2019 How to Make a Form in Word

    23/26

    Information Services

    2007 Queens University Belfast Page 23

    Figure 31: Import Data

    Note that the results from check boxes will be stored as O or 1(0 = not ticked;1 = ticked)

    Before importing the data you could have set up headers for the results in the first row ofthe spreadsheet.

    Only results for one text file can be brought in at a time, although data could be copiedfrom individual text files into one major text file and then imported into the spreadsheettogether.

  • 8/8/2019 How to Make a Form in Word

    24/26

    Information Services

    2007 Queens University Belfast Page 24

    Practical - Check Box Example - Macro

    When using check boxes in Word it is possible to tick more than one box. Sometimes it may bepreferable to only allow the user to check only one box. This practical will show you the Visual

    Basic code used in a Macro to ensure that only one check box can be selected in a form, as in theexample below.

    Do you think Macros with Visual Basic should be included in this 3 hour session?

    To Record the Macro

    1. Ensure the Developer tab is selected. From the Code group, select RecordMacro (seefigure 32).

    2. Type a name and a description for the Macro, i.e. CheckBoxExclusive and clickOK.3. Note that the Code group has changed, i.e. Record Macro has gone and Stop Recording

    has appeared. Pause Recording has become active (see figure 33). The mouse pointerwill change to a cassette to record the macro.

    4. In this case, select the Stop recording button within the Code group. (see figure33).

    5. Select Visual Basic from the Code group (see Figure 33).6. Ensure the View Code option is selected (see figure 34)7. Open the document Code for Exclusive Check Button (from the folder on the desktop)

    and select all the text, starting Sub checkBoxExclusive.

    8. Copy the text and paste it into the Visual Basic Editor9. The editor should resemble figure 34.

    Figure 32: Record Macro Figure 33: Macro Recording

    Yes No Not Sure

  • 8/8/2019 How to Make a Form in Word

    25/26

    Information Services

    2007 Queens University Belfast Page 25

    Figure 34: Visual Basic

    10. Click on the File menu and select Close and Return to Microsoft Word (see figure 35)Figure 35: Return to Microsoft Word

    View Code

    Check Box Exclusive Code

  • 8/8/2019 How to Make a Form in Word

    26/26

    Information Services

    2007 Queens University Belfast Page 26

    You are now going to apply the macro to a group of check boxes to ensure only one in the group

    can be selected. The check boxes must be placed in a frame together to enable the macro to work

    (Note that frames cannot be used within a table).

    11. Select the Developer tab and from the Legacy tools, select Insert Frame12. Insert three check boxes into the frame. For each of the check boxes, select the Form

    Field Options button from the toolbar and under Run macro on select the

    CheckBoxExclusive macro under Entry (see Figure 36) and clickOK.13. Protect the form and test by selecting a check box. By selecting another check box, the

    first check should be removed.

    Figure 36: Run Macro on Entry - CheckBoxExclusive