Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Sep 2003
    Location
    Texas, USA
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    inserting file name and path in document (Word 97 and 2000)

    How do I insert the path and file name of a document in my Word document? It is for the purpose of facilitating finding the document on the computer when all I have is the hard copy to refer to. Thanks!

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: inserting file name and path in document (Word 97 and 2000)

    You could insert a FILENAME field with the p switch to specify that the path should be included.

    You can do this from the Insert Fields dialog box or by typing Control-F9 to create the { } braces, then typing { FILENAME p } in the middle, then right clicking the field and choosing Update Field from the menu.

    StuartR

  3. #3
    2 Star Lounger
    Join Date
    Dec 2003
    Location
    Ossining, New York, USA
    Posts
    114
    Thanks
    4
    Thanked 2 Times in 2 Posts

    Re: inserting file name and path in document (Word 97 and 2000)

    Go to Header and footer toolbar and the Insert AutoText menu. One of the choices is File name and path.

    Fred

  4. #4
    Star Lounger
    Join Date
    Apr 2002
    Location
    Stone Ridge, New York, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: inserting file name and path in document (Word 97 and 2000)

    For Word 2003 - Do you know how I would get the file name and path to automatically update when the file is saved? With it not in the footer but rather, under the Sender Name at the end of a letter... and this is on a template (.dot). Thanks.

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: inserting file name and path in document (Word

    Have you customized Word's usual FileSave and FileSaveAs and FileClose behavior? If so, you could tuck in another line to update all fields in the body, or a loop to skim through looking for matching fields and updating only those. If you currently use the built-in FileSave, FileSaveAs and FileClose functionality, there are quite a few little hurdles to getting a truly smooth integration, especially for the "exit" scenario....

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: inserting file name and path in document (Word 97 and 2000)

    I'd like to emphasize Jefferson's warning - I'd think twice before trying to customize the FileSave and FileSaveAs commands.

    Although not quite what you want, I'd put code to update fields in the Document_Open procedure in the ThisDocument module of the template:

    Private Sub Document_Open()
    ActiveDocument.Fields.Update
    End Sub

    This way, the document name will be up-to-date when the document is opened (if the template is available), even if it has been moved or renamed in Windows Explorer.

  7. #7
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: inserting file name and path in document (Word 97 and 2000)

    That's exactly what I did a few years back. But then the Helpdesk got a lot of call from users complaining about Word asking them to save the file, although they didn't change anything... So I ended up adding a line:

    ActiveDocument.Saved = True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •