Inserting a Document's File Location

by Allen Wyatt
(last updated March 4, 2019)

3

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

Choosing an Equation Style

You can define styles for different characters used in the Equation Editor. It is not as full-featured as styles in Word, ...

Discover More

Clearing and Deleting Cells

When you want to remove information from a worksheet, you can either clear cells or delete cells. This tip examines the ...

Discover More

Turning Off Capital Corrections

Tired of having Excel second-guess you when you type a word that starts with two capital letters? You can turn off this ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Date Last Edited

You can insert several dynamic dates into your document. One you may want is to add the date when the last edit was ...

Discover More

Inserting the Template Name in Your Document

Templates are a powerful part of the Word experience, as they allow you to create and format documents based on patterns. ...

Discover More

Understanding the Advance Field

You can use the Advance field to change where text is positioned in your document. This tip shows how to use it and 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 0 + 2?

2019-03-19 08:45:21

Karen E Nelson

Is there a way to create a shortcut to get this done?


2017-06-15 06:59:05

James Collett

This generates the full folder path plus the file name. The file's location arguably does not include its name.

It would appear that Word 2013 does not provide the option to include the folder path only. Colleagues using Word 2016 report the same restriction.

Mildly cr@p of Microsoft.


2016-09-20 12:35:20

Benjamin C. Morin

Under Step 6 above, I do the following:

Select Filename, when you select Filename, two more options appear on the dialog box:

Format on column 2 and Field Options on Column 3.

Format: Title Case (or choose one)
Field Options: Check mark the box for "Add path to filename".

I'm done.

One draw back for this field: If you later copy the same file to another location, the path and filename does not automatically update in the new location. You would have to go to the new location, find the file, select the field and update it and resave the document. Otherwise the path and filename will be miss leading.

Hope this helps.

Benjamin


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.