Automatically insert file name & path in documents

Posted on 2012-08-15
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
    LVL 6

    Accepted Solution

    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

    Your answer works - thank you!
    LVL 6

    Expert Comment

    You're welcome! Please accept as solution and assign grade and points. ;-)
    LVL 6

    Expert Comment

    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!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Lately there has been a variety of news related to U.S. employment.  Stories about worker productivity, automobile and airline unions, low employment and foreign laborers have frequented the news.  Each story has good and bad attributes we might arg…
    This collection of functions covers all the normal rounding methods of just about any numeric value.
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
    An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now