How can I put a footer on the last page and make it a macro?

G

Guest

I need to create a macro that will insert a footer containing filename and
pathname only on the last page of a document.

Can anyone help?
 
J

Jay Freedman

Walter said:
I need to create a macro that will insert a footer containing
filename and pathname only on the last page of a document.

Can anyone help?

You do NOT need a macro. You need a special field in the footer that
displays a result only on the last page, as explained at
http://gregmaxey.mvps.org/Conditional_Headers_Footers.htm. For your purpose,
the field code should be

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

The article shows how to create nested fields (fields inside of fields).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How do you insert the path name into a footer Word 2007? 1
Excel Unique last page footer 1
Macro Help, continued 4
Automatic filename in Footer 6
Macro help 1
Footer Question 1
Macro to remove page numbers 1
Last page footer 1

Top