Inserting a Field into a Document

By far, the easiest way to put a field into a document is to use one of the built-in Word features to do the dirty work for you. For example, if you choose Insert, Date and Time, and then check the Update Automatically box, Word inserts a {Date} field into your document, adding a formatting switch for the date format you choose (see Figure 19.1).

Figure 19.1. Checking Update Automatically in this dialog box causes Word to insert a {Date} field, instead of the date itself.


Similarly, putting a page number in a header or footer using the Insert Page Number button on the Header and Footer toolbar will insert a {Page} field, as will inserting a table of contents or index, creating a caption or cross-reference, or running a document merge.

If you want to build a field from scratch, you can do it the hard way, by pressing Ctrl+F9 to create the field marks, and then manually inserting the field name and parameters. If you make a mistake, of course, the field won't work as you expect. To be absolutely certain you get the syntax right, choose Insert, Field instead. This Field dialog box (see Figure 19.2) offers context-sensitive help and immediate access to the most common field switches (the terms "properties" and "options" are somewhat arbitrary; don't get hung up on the terminology). If you want to work with the raw field code, click the Field Codes button in the lower-left corner.

Figure 19.2. Word provides good support for fields via the Field dialog box.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.178.181