Avatar of camtz
camtz
Flag for United States of America asked on

Directory for Word documents

Is there a way to have Word, Excel show the directory at the top of the page so that I know where the document is stored on the computer using Windows 10? Thanks
Windows 10Windows OSMicrosoft ExcelMicrosoft WordMicrosoft Office

Avatar of undefined
Last Comment
camtz

8/22/2022 - Mon
NVIT

There doesn't seem to be a built-in way to do that. You'll need to use a macro.

https://word.tips.net/T001248_Full_Path_Names_in_Word.html

There are a couple of ways that this can be approached. If you only need to know the full path name once in a while, then you can create a very simple macro and assign it to a toolbar button. When you click on the button, the information in the title bar for the active window is changed to reflect the full path name. This macro, called ChangeCaption, is as follows:

Sub ChangeCaption()
    ActiveWindow.Caption = ActiveDocument.FullName
End Sub

Open in new window


There are a couple of big drawbacks to this option, however. Whenever you rename the document by using Save As to save it under a different name, the new file name (and path) are not updated in the title bar unless you rerun the macro. Secondly, if you have virus checking turned on, then it may interpret your macro (assigned to AutoOpen) as an attempt by a macro virus to mess with your system.

There is a way to create a more comprehensive and automatic approach... Essentially, the steps used in accomplishing this approach are as follows:
1. Set up Word to trigger application events (they're built in to Word, but they don't happen automatically).
2. Write some the actual title-bar changing code for the DocumentChange event.

Then explains how to setup the approach, including related macro code.
John Korchok

In Word, use Insert>Quick Parts>Field and choose Filename. Check the box in the dialog to add the path. Place this in the page header to display it on every page. Add it to your Normal.dotm template to ensure it appears in every document.

In Excel, choose the Page Layout tab, then open the Page Setup dialog. Click on the Header/Footer tab, then click on Custom Header. Click on the Insert File Path button, which adds both the path and file name to the header. Repeat for each worksheet where you want the info to appear. If you save the resulting file in the Excel Startup directory and call it book.xltx, the file name and path with appear on all new workbooks without any effort on your part.
ASKER CERTIFIED SOLUTION
Paul Sauvé

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
camtz

ASKER
Paul, I have looked for Quick Access Toolbar in Word but can't find it.  Sending a pic of what mine looks like.  Can you give me more instructions please.This is what Options looks like
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
John Korchok

In Word 2007, click on the Customize option to find the QAT commands.
Paul Sauvé

perhaps also from here:QAT
camtz

ASKER
Thank you, I found it.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.