Word: Putting the file path in the documentJuly 19, 2010
Bill, a work colleague, asked:
How do I insert the file path and file name into a footer? It was easy in Word 2003 but I can’t find a way in Word 2007. This is just to remind me where the hell I put it!!
I walked Bill through the steps, and also got him to turn on field shading so he would always know when any apparent text was actually a field.
Here’s how to insert a file path and file name into your Word 2007 document:
- Place the cursor where you want to insert the file path/name (this might be the main body of the document, the header or the footer).
- Go to the Insert tab > Text group.
- Click the Quick Parts button, then click Field near the bottom of the drop-down list.
- On the Field window, scroll down the list of Field Names and select FileName, then select the Add path to filename check box. (Adding the file path to the file name is very useful for everyone, but especially for those who save their documents on large corporate networks.)
- Click OK.
- The field is inserted into your document. If it’s a new document that you haven’t saved yet, you’ll see DocumentX as the file path (where X is the document number):
- Save the document, then place your cursor anywhere in the field and press F9 to update the field (or right-click in the field and select Update field). The field updates with the correct file name and path.
If you want the file name/path field to update automatically, you’ll need to do any of these:
- Switch to Print Preview then back
- Add a macro — see http://support.microsoft.com/kb/832897 for details
- Switch to Draft mode, select all (Ctrl+A), then press F9 to update ALL fields in the document. Switch back to Page Layout mode when the update has finished.
- See https://cybertext.wordpress.com/2008/01/25/update-fields-in-headers-and-footers/ for other alternatives.
Update: You can add this footer to your footer ‘Quick Parts’ gallery so that you don’t have to go through these steps every time.
- Once you’ve done all the steps above, select the footer contents.
- Click the small drop-down arrow to the right of Footer in the Header and Footer group on the Design tab.
- At the bottom of the drop-down list, click Save Selection to Footer Gallery.
- Complete the details and click OK. (Hint: If you want your footer to show at the top of this list in future, add a space or underscore before the name.)
- When you next want to add this footer to a document, open the footer, then just choose it from the Footer list (step 2).
(Thanks to James’ comment on 1 June 2012 for these steps.)