Erik's Web Making Fillable Forms in Microsoft Word

Introduction to Making Templates

I have found that making a template for Microsoft® Word is non-trivial and I have not found any good references that make sense of the process so here's my accumulated knowledge, hints, and tips.

The information given is primarily for Word 97/2000 for Windows, but it should work on Word 98/2001 for Macintosh.

Everything described here does not require any special features/modules, etc. Just some pluckiness to try out creating some forms.

Basic Concepts

  1. Documents have a fixed type either Template type or Regular type that is established when the document is created.
  2. Creating a new Template type document is accomplished from within the File>New dialog box
  3. Simple Editing Procedure (Windows)
  4. Basics about Words forms

Click and Type Here Tutorial

Remember this type of template is best used for letters, pleadings, and free form documents.

Start with a Template type document. Create the document formatting, styles, margins, etc., like you would in a normal document.

As you come to parts of a document where users should make changes, e.g. entering a recipient's name, their closing, etc. You can insert what word calls a "MACROBUTTON" field and what I call a click-and-type area. And which, if your view options are set to show field shading will show up in grey as seen at right.

The click-and-type areas look like the picture at right and can be created in by goint to Insert>Fields and selecting "Document Automation" from the left hand column and "Macro Button" from the right hand column.

In the data entry area below the columnar selection lists, append

None [Click and Type <<Description>> Here]
	

As you can see in the figure at right, I omitted any particular description. For example you might have said, "Click and Type Recipient's Name Here", etc. The description is helpful since in a free-form template like a letterhead it may not be obvious what should be typed at a given point without a hint.

You can examine the field more closely by using the right menu command while clicking on the field to "Show Fields" or "Show Field Codes". (Alt-F9 to toggle in Windows) You would see something like this where the field was:
{MACROBUTTON None [Click and Type Recipient Here]}
	
Word sometimes "helps" you by inserting a space between the "]" and the end of field "}" which you can delete by clicking on the space and deleting. You can also edit the text of the brackets and apply formatting.

Tip 1: Change the color of the text between the brackets to red or some other highly visible color since it is the formatting of the brackets that will be applied, e.g.:
{MACROBUTTON None [Click and Type Recipient Here]}
	

Tip 2: Use copy and paste of the entire field to add more click and type areas fast.

Table Form Tutorial

This is a somewhat more challenging type of document to create especially if you want users to be able to edit the filled form en toto after completion.

I recommend making the "Forms" tool palette visible since you will use the palette to insert form fields, primarily check boxes and text areas as seen at right where the checkboxes are shown a rectangles and the text areas are the open grey spaces.

Each Text Form Field would show as a {FORMTEXT} with Show Fields toggled (Alt-F9) and each check box as a {FORMCHECKBOX}.

If you attempt to use the form at this point (save your document and rename with .dot extension) you'll discover that it does not quite work as one might hope. The form fields are not "live", they can't be typed into, and tabbing simply inserts a tab.

Option 1: Completely Locked Form

If you re-open the template document as editable, you can protect the form, Tools>Protect and select "Forms" option and give a password or even an empty password and now the form will work (when re-saved and renamed with .dot).

However, you can not spell check the document and the users can not change anything.

Option 2: Self-Unlocking Form

This is my preferred route for heavy duty forms. One limitation is that I have yet to figure out how to re-use data entered once across the form.

Create your form in a Template type document as above, but then go Tools>Macros>Visual Basic Editor

Create a macro that will unlink the fields. It is important that the macro be recorded (or created) in the project for the template type document you are working with. A sample Unlink macro is at right.

Sub Unlink()
ActiveDocument.Unprotect Password:="Daisy"
Selection.HomeKey Unit:=wdStory, Extend:=wdExtend
Selection.Fields.Unlink
Selection.MoveRight Unit:=wdCharacter, Count:=1
' Message is optional provides hints for new users
' Message should be all on one line
MsgBox "Document protection has been turned OFF
to allow edits to the entire document.
Do not turn protect mode back on. To check
or uncheck a box, double click directly over
the box and select checked or unchecked from
the Form Field dialog box."
End Sub

Notice the macro needs the password (you haven't yet assigned) to unlink the document. For that reason I generally use two passwords at a time, e.g. my pets names: Daisy and Justin. I use Daisy to protect the document (Tools>Protect>Forms) and Justin to protect access to the macro. The important point is to use something you will remember and use it consistently since if you forget you will be locked out of your templates.

After saving and protecting the macro project against viewing, go back to the document and double click on the last {FORMTEXT} or {FORMCHECKBOX} and set the "Exit" action to "Unlink" or whatever you named your macro. Be careful from this point on not to tab through your template and accidentally unlink, and thus remove all of your fields.



$Id: index.html,v 1.2 2002/08/15 04:35:50 erik Exp $