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

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » inserting file name and path in document (Word 97 and 2000)

    Author
    Topic
    #411908

    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!

    Viewing 3 reply threads
    Author
    Replies
    • #896549

      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

    • #896550

      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

    • #896553

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

      Fred

      • #1043557

        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.

        • #1043559

          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….

        • #1043562

          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.

          • #1044090

            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

    • #896554

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

      Fred

    Viewing 3 reply threads
    Reply To: inserting file name and path in document (Word 97 and 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: