Microsoft Office Tutorials and References
In Depth Information
These rules, which are tied to speciﬁ c Word ﬁ eld codes, are explained in Table 10.2. Note
that many of these are supported by dialog boxes that guide you through proper syntax,
making them easy to use and understand.
TABLE 10.2 Merge Rules
This ﬁ eld prompts you to provide information and assigns a bookmark to the
answer you provide; the information is stored internally. A reference to the
bookmark can then be used in the mail merge document to reproduce the
information you type. A default response to the prompt can also be included in
the ﬁ eld. The ASK ﬁ eld displays as an empty bookmark in the mail merge
document. You might use this ﬁ eld in conjunction with an IF ﬁ eld to prompt for
missing information during a merge.
This ﬁ eld prompts you to enter text, and then uses your response in place of
the ﬁ eld in the mail merge document. This is similar to the ASK ﬁ eld, except
that the information can be used only in one place.
This is used in mail merge documents to control the ﬂ ow and to create a
conditional statement that controls whether speciﬁ c mail merge ﬁ elds are printed or
included in the merged document.
This ﬁ eld provides a counter of mail merge documents that actually result from
a merge. If you merge the entire database and do not change the base sorting,
and if no records are skipped, then MERGESEQ and MERGEREC will be
When doing a mail merge, the MERGEREC ﬁ eld serves as a counter of records
in the data ﬁ le and doesn’t count the number of documents actually printed.
This ﬁ eld is incremented by the presence of NEXT and NEXTIF ﬁ elds. If you
skip records using SKIPIF, MERGEREC is incremented nonetheless.
The NEXT ﬁ eld is used to include more than one record in a given document.
Ordinarily, when doing a mail merge, one document is printed for each record.
With the NEXT ﬁ eld, however, you can include multiple records in a single
document. This can be useful when you need to refer to several addresses from a
data ﬁ le. When doing a label merge, the NEXT ﬁ eld is provided automatically,
and appears as <<Nex t Record>>.
The NEXTIF statement works like the NEXT ﬁ eld except that it advances to the
next record only if an expression being evaluated is true. A typical use is to skip
a given record if a particular key ﬁ eld is blank. For example, in an e-mail merge,
if you haven’t otherwise excluded records with blank e-mail addresses, you can
use NEXTIF to do it.
The SET ﬁ eld is used to change the text referred to by a bookmark. SET often
is used in conjunction with IF to conditionally change how particular text is
deﬁ ned based on external factors, such as the current date, or internal factors,
such as the value(s) of particular ﬁ elds.
The SKIPIF ﬁ eld is used to cancel processing of the current database record
during a mail merge. For example, you might use it to screen out a particular