Warren is using Word 2003 and needs a way to show the document title (from the document properties) in the title bar of the document window when he first opens the document. Currently, only the filename shows when he first opens the document. The document title shows only after the first time he saves the document.
Actually there is a way to do this, and it will work in Word 97 through Word 2003. All you need to do is add a macro that runs automatically when the document opens. You do this by opening the Visual Basic Editor (Alt+F11) and using the Project Explorer (top-left portion of the Visual Basic Editor) to open the code window for the ThisDocument object for your document. Then, put this macro in the code window:
Private Sub Document_Open() Application.Caption = _ ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle) End Sub
The macro executes when the document is opened. It grabs the document title (from the properties for the document) and stuffs it into the caption for the program (the title bar).
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (3422) applies to Microsoft Word 97, 2000, 2002, and 2003.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
As you are typing, AutoCorrect provides a "check" that what you are entering doesn't match some pre-defined error ...
Discover MoreNeed to create a directory from within a macro? You can do it using a single command line, as detailed in this tip.
Discover MoreAdd-ons can extend the capabilities of Word, sometimes significantly. These extensions are due to macros contained in the ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments