With many templates, the user is required to fill in certain document properties, such as the title, subject, author, or keywords. Ensuring that these values are entered can be a cruÂcial part of a document management system. One way to do this is to use a Fill-in field, which displays a dialog box that prompts the user for data. The entered data is then disÂplayed as the field result:
{ FILLIN Prompt }
Prompt is the text that appears as a prompt in the dialog box. Here’s an example:
{ FILLIN “Please enter the document title:” }
If you insert this field in a template, Figure 1 shows the dialog box that appears when the user creates a new document based on the template.

Figure 1 When you update a Fill-infield, Word displays a dialog box simÂilar to this one.
Although it may occasionally be useful to store user input in the document (this often hapÂpens in mail merges, for example), what if what you really want to do is change the actual document properties? Because each document property has its own field type, you can change many properties by specifying the Fill-in result as the new property value. For example, the following code prompts the user for a document title and then stores the result in the Title property using the Title field:
{ TITLE { FILLIN “Please enter a document title:” } }
TIP
Unfortunately, the result of the Titlefield displays in the document text.To avoid this,you can hide the result by placing everything inside a Seqfield.You normally use this field to create a sequential numbering system, but it comes with a \hswitch that hides the field. Here’s the hidden form of the Fill-infield:
{ SEQ \h { TITLE { FILLIN “Please enter a document title:” } } }TIP
If you’re not sure of the field name to use for a particular property, you can display a list of the variÂous document property fields. Choose Insert, Quick Parts, Field to open the Field dialog box. In the Categories list,click Document Information.The Field Names list shows all the document property fields.
NOTE
Word also comes with an Ask field type.This works the same as Fill-in, except that the result is stored in a bookmark:
{ ASK Bookmark Prompt }
Technorati Tags: field, text input, word 2007
Popularity: 2% [?]








Recent Comments