How do you get exact file location to print out on the last page

  • Thread starter Thread starter Guest
  • Start date Start date
You can insert the filename and path in the document footer using the
AutoText menu on the Header and Footer toolbar. If you want it to appear on
just the last page, you can either:

a. Insert it at the end of the document, using Insert | AutoText | Header
and Footer | Filename and path, OR

b. Make it show up in the footer on just the last page by using this field:

{ IF { PAGE } = { NUMPAGES } { FILENAME /p } }

Insert the field as follows:

1. In the footer pane, press Ctrl+F9, which will insert a pair of field
delimiters (they look like braces but can't be entered from the keyboard).

2. Between the braces, type IF and a space.

3. Press the Insert Page Number button on the Header and Footer toolbar.

4. Type a = with spaces on either side.

5. Press the Insert Number of Pages button on the H&F toolbar.

6. Insert the "Filename and path" entry from the AutoText menu on the H&F
toolbar.

Unless you are on the last page when you do this, your field will probably
disappear, but you will see it when you view the footer on the last page.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Hi rebadoo

You don't need a macro for this. All the tools you need are on the Header
and Footer toolbar.

View > Header and Footer. The Header and Footer toolbar will appear. Click
the "Switch between Header and Footer button" to get to the footer.

On that toolbar, click the Insert Page Number button. If you then see a page
number, do Shift-F9 so you can see the field codes. Then type an equals sign
(=). So it looks like { PAGE } =

On the toolbar, click the Insert Number of Pages button. And then, click
Insert AutoText and choose Filename and path.

So it now looks like { PAGE } = { NUMPAGES }{ FILENAME \p }

What you now need to do is to select the whole thing (but *not* the
paragraph marker at the end of the paragraph). Type ctrl-F9 and type IF. So
the final field is:
{ IF { PAGE } = { NUMPAGES } { FILENAME \p } }.

Select the whole thing and press F9 to update it and Shift-F9 to display the
result.

Note that if you make a mess and need to start again, you can't type the {}
braces by hand. You must use ctrl-F9 and type between the braces that Word
inserts for you. Once you've typed the field, use F9 to update it. Shift-F9
toggles between the display of field codes and display of field results.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
Back
Top