The information in this article applies to:
- Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
- Microsoft Word for Windows 95, versions 7.0, 7.0a
- Microsoft Word for Windows NT, version 6.0
SUMMARY
This article describes how to automatically place the file name of the
current document (or any other field result) on the last page of every
document based on the Normal template.
MORE INFORMATION
To place the file name on the last page of every document based on the
Normal template, follow these steps:
- On the File Menu, click Open.
- In the List Files of Type list, click Document Templates.
- Select the folder where your templates are stored (for example,
C:\MSOffice\Templates or C:\Winword).
- Click the Normal template (Normal.dot), and click Open.
- On the View menu, click Header and Footer.
The first button on the left on the Header and Footer toolbar toggles
between the header and footer. Toggle to the one that you want the field
to appear in.
- Press CTRL+F9 (Windows) or COMMAND+F9 (Macintosh) to insert a field.
- Type the following in the field brackets
if { page }={ numpages } "{ filename \p }"
so that the field looks like this:
{ if { page } = { numpages } "{ filename \p }" }
NOTE: The \p switch causes the entire path to the file name to be
included.
NOTE: The field brackets are actual fields and the code should not
be copied. They should be entered as separate fields, i.e. each set
of brackets corresponds to a field.
- On the File menu, click Save. Close the file.
The If field determines whether the current page equals the number of pages
in the document. This field is present in the header or footer on every
page in the document. However, the file name will be printed only on the
final page of the document. These steps can be used with any field (that
is, you can substitute another field code for File name if you want
different results to print, such as the date).
|