none
Default settings - automatically populating a file path on each word doc RRS feed

  • Question

  • With our team growing so fast, we want to be sure that everyone knows where to locate important shared files. We have been manually entering the file path on each word document, or entering it as a hyperlink; however, we are interested in setting this up as a default, so that everythings saved by our team on our individual or shared drives automatically has the file path at the end of the document. Is there a way to do this?

    Thanks

    Tuesday, August 14, 2012 7:39 PM

Answers

  • I was able to get it set up, however, it is always C\users....\Normal.dotm. Is there any way to make it automatically update the filepath as the document is saved so that it reflects where the document is saved, not the template??

               

    When you create a new blank document you should see the name of an untitled document (which is "Document" followed by a number) rather than the path to Normal, but you are right: it won't update automatically. To force an update (assuming that the field is in the header or footer), you can switch to the Backstage view (called Print Preview in older versions of Word) and then back to your favorite view. You can use Ctrl+F2 followed by ESC.

    Alternatively, use a macro to do the updating for you. One example is given in the article at http://www.gmayor.com/installing_macro.htm.


    Stefan Blom, Microsoft Word MVP

    Monday, August 20, 2012 5:47 PM

All replies

  • Have you considered using the FILENAME field?

    Stefan Blom, Microsoft Word MVP
    Tuesday, August 14, 2012 9:44 PM
  • I'd suggest inserting a FILENAME field into the document template's footer with the '\p' switch. That will generate an output showing the document's name and path.

    Of course, when a document is first created, all the field will show is 'Document1' or something such. Once saved, a print preview will update the field to show the name and path.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Tuesday, August 14, 2012 10:37 PM
  • That sounds great. Do you have a link of how to do this?

    Also, is there a way to set this as a default for ALL word documents?

    Wednesday, August 15, 2012 2:10 PM
  • You should be able to open Normal.dot for editing. Add the field to the template and save the template. Any document opened which is based on the template would then have the field.

    You would need to do this for each user, or point each user to a shared location for the template.

    If you don't want the field in absolutely every document, you could create different templates for the different types of documents you use.

    Wednesday, August 15, 2012 3:44 PM
  • "TCHD" wrote in message news:f3274868-2eb4-4fe7-86cb-7e65b22f3505@communitybridge.codeplex.com...
    That sounds great. Do you have a link of how to do this?
     
    Also, is there a way to set this as a default for ALL word documents?

     
     
    Open your template as a document (via the File | Open dialog box) and then insert the field. You can use the Insert | Quick Parts | Field dialog box. Alternatively, press Ctrl+F9 to insert a pair of field delimiters, { }, and manually type in FILENAME \p.
     
    To update the fields in the selection, press F9 to update. To show/hide field codes, use Alt+F9.

    Stefan Blom, Microsoft Word MVP
    • Proposed as answer by JosephFox Wednesday, August 15, 2012 6:41 PM
    Wednesday, August 15, 2012 5:03 PM
  • You will need to open the template for editing. To do this:
    • choose File|Open
    • set the File Type dropdown to 'All Word templates'
    • navigate to your templates folder. The default path is either:
    C:\Documents and Settings\%Username%\Application Data\Microsoft\Templates\ or
    C:\Documents\%Username%\Application Data\Microsoft\Templates\
    These folders are usually hidden.
    • open the template, probably Normal.dot(x/m)
    • access the template's header/footer that you want to add the field to
    • press Ctrl-F9 to create a pair of field braces, then type 'FILENAME \p' between them, so that you end up with '{FILENAME \p}'
    • save & close the template.

    Unless the template is shared (in which case it's probably in a different location), each user will need to replicate this or one user could do it and arrange for the template to be copied to the other users' template folders. If the template is shared, you can find its location (assuming Office 2010) via File|Options|Advanced>File Locations. There you'll find entries for User Templates & Workgroup Templates.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Wednesday, August 15, 2012 10:54 PM
  • Thanks, this is very helpful.

    I am, however, running into the problem that it won't let me save the template as Normal.dotm (the way I opened it) because it says the file is already open and it can't give something open the same name.

    Any ideas there?

    Thursday, August 16, 2012 5:44 PM
  • I am, however, running into the problem that it won't let me save the template as Normal.dotm (the way I opened it) because it says the file is already open and it can't give something open the same name.

    Any ideas there?


                

    Did you make sure to actually open the Normal template (as opposed to trying to replace it with another template)? This is an important distinction.

    Note that you can use some VBA to easily open the Normal template: From within Word, press Alt+F11; in the Visual Basic Editor, press Ctrl+G to activate the Immediate window. Type

    NormalTemplate.OpenAsDocument

    and press Enter. Normal opens in a separate window which isn't necessarily the active window (and you should close the Visual Basic Editor).


    Stefan Blom, Microsoft Word MVP

    Thursday, August 16, 2012 5:49 PM
  • I was able to get it set up, however, it is always C\users....\Normal.dotm. Is there any way to make it automatically update the filepath as the document is saved so that it reflects where the document is saved, not the template??
    Monday, August 20, 2012 3:54 PM
  • I was able to get it set up, however, it is always C\users....\Normal.dotm. Is there any way to make it automatically update the filepath as the document is saved so that it reflects where the document is saved, not the template??

               

    When you create a new blank document you should see the name of an untitled document (which is "Document" followed by a number) rather than the path to Normal, but you are right: it won't update automatically. To force an update (assuming that the field is in the header or footer), you can switch to the Backstage view (called Print Preview in older versions of Word) and then back to your favorite view. You can use Ctrl+F2 followed by ESC.

    Alternatively, use a macro to do the updating for you. One example is given in the article at http://www.gmayor.com/installing_macro.htm.


    Stefan Blom, Microsoft Word MVP

    Monday, August 20, 2012 5:47 PM