logo
search
Printing Problems

How to Print the Full File Path in a Word Document

Maira MehtabMaira Mehtab Sep 21, 2026 869 views

Question details

The user wants to automatically display and print the exact directory path or file location of a Word document within the document itself.

Product
Microsoft Word
Device & OS
not provided
Scenario
Preparing a document for printing and needing to retain a physical reference to its digital file location on a local drive or network.
Observed behavior
The user needs to configure the document to dynamically show the full file path using field codes.
Before you start

Ensure your document is saved to your computer or network drive first, as unsaved documents will not have a valid file path to display.

Solution 1Recommended

Use Field Codes to Insert and Print the File Path

You can use the built-in FILENAME field code with a specific formatting switch to display the entire file path dynamically in your Word document.

Microsoft Word allows you to insert dynamic field codes that update automatically based on document properties. By using the FILENAME code with the \p switch, Word will fetch and generate the exact file location.

1
Position your cursor

Click in your document where you want the file path to appear. This is commonly placed in the header or footer so it prints on every page.

2
Insert field code braces

Press 'Ctrl + F9' on your keyboard to insert a pair of field code braces: { }. Note: On some laptops, you may need to press 'Ctrl + Fn + F9'.

3
Enter the file path command

Inside the newly created braces, type the following text exactly: FILENAME \p

4
Update the field

Press 'F9' (or 'Fn + F9') to update the field. The code will disappear and be replaced by the full file path of your document.

5
Print the document

Proceed to print your document as usual (File > Print). The file path will be included exactly as it appears on your screen.

Keyboard Shortcut Note: Do not type the curly braces { } manually using the shift key. You must use Ctrl+F9 to create functional field braces, which appear highlighted in gray.
Efficient Document Creation

Insert and Print File Paths Easily with WPS Writer

WPS Office Writer offers robust support for field codes, allowing you to seamlessly insert, display, and print file paths just like in Microsoft Word. It provides a visual menu for inserting these codes, so you don't even need to memorize keyboard shortcuts.

  1. 1. Open your document: Launch WPS Writer and open the document you wish to print.
  2. 2. Navigate to the Insert tab: Click on the 'Insert' tab in the top ribbon menu and select 'Field'.
  3. 3. Select the FileName field: In the Field dialog box, choose 'Document Information' under Categories, select 'FileName' under Field names, and check the 'Add path to filename' option.
  4. 4. Insert and Print: Click 'OK' to instantly insert the full file path into your document, then proceed to print.
Fully compatible with Microsoft Word (.docx) formats.Supports standard field codes and document properties like FILENAME.Visual menu interface eliminates the need to memorize complex shortcuts.Lightweight, fast software that is free to download and use.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the file path not update when I move or rename the file?

Field codes do not always update automatically in real-time. If you move or rename the file, you need to refresh the field. Click on the file path text and press F9, or right-click it and select 'Update Field'.

Can I put the file path in the footer so it prints on every page?

Yes. Double-click the bottom margin of your document to open the Footer area, and then insert the { FILENAME \p } field code there. It will automatically replicate across all pages of your document.

Why am I seeing the code text instead of the actual file path?

You likely have field codes toggled on. Press 'Alt + F9' (or 'Alt + Fn + F9' on a laptop) to toggle between displaying the raw field codes and displaying their actual results.

Does this work if the document is saved on a cloud drive like OneDrive?

If the document is synced to a cloud service, the file path may display the cloud URL (e.g., https://d.docs.live.net/...) instead of the local C: drive path, depending on your synchronization settings.