The comprehensive approach relies on the use of Word application events. Essentially, the steps used in accomplishing this approach are as follows:. The DocumentChange event, once set-up, happens almost every time the user activates a child document window. You'll notice I said "almost. This is effectively two views of the same document so there is no document change when switching from one view to the other.
Consequently, if a document is open and the user opens a new window to the same document, it won't automatically have it's title bar changed by the code run from the DocumentChange event.
It will be changed later if and when the user changes to this 'new window' view from some other child window containing a different document, however. The second issue is that the DocumentChange event also doesn't get triggered when a new document is saved.
So, if a unsaved document such as Document1, Document2, etc. Fortunately, this can be worked around. The first step, then, is to activate the Word application events. You can do this by following these steps. They can, however, be easily created by following the steps outlined. With this foundation in place, you are ready to make sure the WordApp object is registered whenever Word is started.
The way to do this is to set up an AutoExec macro which is automatically run every time Word is started. You can do this by following these steps:. The final part of making this customization to Word is to make sure that the title bar is updated when you save your file. You can do that by adding the following code to the MyModule module:. When these macros are all entered, you should close Word and restart it. The title bars should all be updated to the full path names. Note: If you would like to know how to use the macros described on this page or on any other page on the WordTips sites , I've prepared a special page that includes helpful information.
Click here to open that special page in a new browser tab. WordTips is your source for cost-effective Microsoft Word training. Microsoft Word is the most popular word processing software in the world. This tip applies to Microsoft Word 97, , , and With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates , a computer and publishing services company.
Learn more about Allen When you update a PivotTable, Excel can take liberties with any formatting you previously applied to the PivotTable. Word's Open dialog box provides many of the same file management functions as Windows Explorer does. One of the functions Referring to cells is typically done using a letter and a number, which represent the column and row. That's not the only The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word On the other hand, because this method utilizes the QAT, it's available in all Office apps except Access.
I'll be working in Word desktop on a Windows 10 bit system, but you can apply this to earlier Ribbon versions and to other Office apps. You don't need a document for this technique, so there's no downloadable example file. If not, it's the small toolbar in the top-left corner. Out of the box, it displays only a few options. You can add some frequently used tools by clicking the dropdown and choosing from the list shown in Figure A.
Toggle the options to display or hide, accordingly. You're not limited to the options in the dropdown list; you can execute macros and add other custom options. Displaying the current file's location is just one of the options you can add to the QAT. Of course, you can always use the Save As feature or add a field code to the document to see the file's location, but glancing at the QAT is quicker and easier. To add this capability to the QAT, do the following:. This control displays more than the current file's path location and filename.
Click the dropdown list to see a list of recently visited web sites via your default browser, as shown in Figure F. Select an item in the list to quickly revisit it. This feature is easy to implement, but as you can see, the width inhibits the display of the full path and filename.
Unfortunately, you are stuck with this property. It won't display the full path to the document. Fortunately, most of us don't care what's in the title bar, but for if you do, VBA is your answer. A simple macro will update the contents of the title bar to display the document's name and path. To add this macro to a document you can also add it to the Normal. Add the following auto macro to the This Document module: Sub AutoOpen 'Display document name and path in the title bar. FullName End Sub.
Open the document. This will trigger the auto macro, which displays the document's full pathname in the title bar.
0コメント