Inserting a Document's File Location

by Allen Wyatt
(last updated February 22, 2020)

1

It is often handy to insert the location of a document into your document itself. For instance, you may want the footer of your document to include an indication of a document's file name, along with the full path for the file. You can do this easily by following these steps:

  1. Position the insertion point where you want the file name inserted.
  2. Choose the Insert tab of the ribbon.
  3. Click the Quick Parts tool in the Text group.
  4. Choose Field. Word displays the Field dialog box. (See Figure 1.)
  5. Figure 1. The Field dialog box.

  6. Choose Document Information from the Categories list.
  7. Select FileName from the Field Names list.
  8. Make sure the Add Path to Filename check box is selected in the third column of the Field dialog box. (See Figure 2.)
  9. Figure 2. The Add Path to Filename check box selected.

  10. Click on the Field Codes button. Word modifies the display of the dialog box.
  11. Click Options. Word displays the Field Options dialog box.
  12. Click on the Field Specific Switches tab. (See Figure 3.)
  13. Figure 3. The Field Specific Switches tab of the Field Options dialog box.

  14. Choose the \p option. (This causes the path of the file name to be included in the field results.)
  15. Click on Add to Field.
  16. Click on OK to close the Field Options dialog box.
  17. Click on OK to close the Field dialog box and insert the field.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (7552) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Office 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Changing Column Width

Do you use columns in your document layout? You may want to modify the widths of various columns, and Word makes the ...

Discover More

Specifying a Time Server for Windows to Use

Windows can utilize resources on the Internet to make sure that your computer's internal clock is working at the right ...

Discover More

Comparing Strings

As your macro is processing information, there will doubtless be times that it will need to compare information in ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Updating Calculated Fields in a Form

When creating a Word form, you use special form fields to collect information from users. You can even perform ...

Discover More

Finding Fields

Fields allow you to add simple dynamic content to your document. Here's how you can find the fields when you need to know ...

Discover More

Fields Won't Update when Printing

When you print a document, Word normally performs several steps, one of which is to update any fields contained in the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 + 3?

2020-02-26 09:08:55

Dee

If the document is moved ... does the file path update?


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.