Title Bar in Word

G

Guest

When working in Word I want the file name and complete path of the document I
am working on to appear in the title bar of the active document window. Can
anyone help with this.
 
J

Jezebel

Switch to VBA and in the immediate window type:

windows(activedocument.Name).Caption = activedocument.FullName

You could set up a macro to do this automatically, but I suggest you try it
manually for a while. On most machines these days, the full path is so long
that the result will be ugly.
 
J

Jay Freedman

Putting the document path/filename in the title bar has at least one
other drawback: If you switch between simultaneously open documents,
the title bar doesn't change unless you do some fancy macro
programming.

The method I like better is to open the Web toolbar, hold down Ctrl
and Alt, and drag a copy of the address box to the empty space on the
menu bar to the right of the Help menu. This control will
automatically track the current document. If the path is too long to
fit, you can click in the box and scroll right, and you can copy from
it to paste elsewhere.
 
J

Jezebel

I agree that your method is better: but in W2003 at least, the titlebar
caption is specific to the document window and does indeed change when you
switch between documents. I seem to recall that this was not the case in
earlier versions of Word.
 
G

Graham Mayor

With the line
ActiveWindow.Caption = ActiveDocument.FullName
added to an autoopen macro, the title appears correctly in all document
windows here in Word 2003 and has done since Word 2000. I take the point
about very long path names if default system paths are retained, but as I
have my data files on a separate drive with "My Documents" directly off the
root of that drive, the sub folders don't go deep enough to reach the end of
the available space.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top