Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Automatically insert file name & path in documents

Posted on 2012-08-15
Medium Priority
Last Modified: 2012-09-26
Is there a way to automatically include the filename & path in a new document in Word or Excel as either a header or footer?

We are using Office 2010 and would like all new documents created in either Word or Excel to include this information.
Question by:nancyk2000
  • 3
LVL 11

Accepted Solution

Colleen Kayter earned 2000 total points
ID: 38298233
In Word, navigate to and open the normal template.

Unless the location has been customized, you should find it in


Be sure you've selected "All Word Templates" as your file type because it's a .dotm (macro-enabled) template, not a .dotx (standard template).

Go into the headers/footers area

On the Insert tab, click Quick Parts and point to Auto Text.

Scroll down to File Name and path and click to insert.

Save the file.

You can copy this file to other computers or to the workgroup templates folder on a server. If you save it to the workgroup templates, you'll need to delete the normal.dotm from all computers or the local copy will take precedence. If a workgroup templates folder has not been set up or if you aren't sure of the location...

Go to File Tab, Options, Advanced. Scroll down to General section (easy to find because your mailing address, or at least a box in which to enter it is there).

Click on File Locations. The folders in which your personal and workgroup templates can be found here.

If you want some document standards on multiple computers, I highly recommend doing the workgroup templates. In the future, if you make changes or additions to the workgroup template, all users will immediately have it. Secure it as Read Only so users cannot overwrite it.

You'll need to insert the Auto Text in any other templates you use. Although styles and other items stored in the normal.dotm are accessible when using other templates, text inserted in the page will not be copied into a document based on other templates.


There is no default template for Excel, but you can create one.

Open a new blank workbook.

On the Insert tab, Text group, Click on Headers/Footers.

On the Headers/Footers Tools tab, you'll find a File Path button. Click. Voila!

excel header with file path
Now the tricky part...

Save as book.xltm (excel template w/macros enabled) and copy to the workgroup templates folder on the server or, if you want to save locally...

C:\Program Files (x86)\Microsoft Office\Office14\XLSTART

or C:\Program Files\Microsoft Office\Office14\XLSTART if you are running the 64-bit version (not recommended by Microsoft because so few add-ins play well with 64-bit version).

Only new blank workbooks will use this template. If you already have several Excel workbooks set up (most companies do), you'll need to insert the File path in each of those templates.

There is a Microsoft knowledgebase article that discusses managing templates. That might help you as well.


Author Comment

ID: 38300306
Your answer works - thank you!
LVL 11

Expert Comment

by:Colleen Kayter
ID: 38301445
You're welcome! Please accept as solution and assign grade and points. ;-)
LVL 11

Expert Comment

by:Colleen Kayter
ID: 38301472
Thank you, NancyK. BTW, I forgot to mention...

If you use the shared workgroup templates and a user opens Word while not connected to the network, Word will create a new default normal.dotm on their C: drive and use it instead. Even later, when they are connected again, Word will still use the local copy. :P

Order of preference for formatting:

1. Document (changes made in the actual document)
2. Document template
3. Local Normal template
4. Workgroup Normal template

Have fun keeping everyone on the same page!

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question