Word 2007: Where is "Web Address" window?

C

cdm

In Word 2003, I could add "Web Address" window to my toolbar so that I could
see the file folder location for any Word document I was working on (dunno
why it was called "Web Address"). I am now using Word 2007, creating a Quick
Access Toolbar. Cannot find "Web Address" in the All Commands list. Has it
been replaced by another "command"? If not, in Word 2007 is there another
way I can quickly see the full file path for a Word document when I have it
open in Word without having to resort to finding it through "File
Properties"? Thank you.
 
G

Graham Mayor

Add the line
ActiveWindow.Caption = ActiveDocument.FullName
to an autoopen macro in the normal template to put the path in the Word
title bar.
http://www.gmayor.com/installing_macro.htm
OR
If you have long pathnames you may wish to abbreviate the path to fit the
title bar. The following macro will do that so replace the above suggested
line with
InsertDocTitle

You may wish to expand this ability and add the function to open the
document at the place the cursor was at when you last saved it. For that you
need some extra macros to intercept the save commands:

Sub FileSaveAs()
On Error Resume Next
ActiveDocument.Bookmarks.Add Range:=Selection.Range, name:="OpenAt"
Dialogs(wdDialogFileSaveAs).Show
'ActiveWindow.Caption = ActiveDocument.FullName
InsertDocTitle
End Sub

Sub FileSave()
On Error Resume Next
ActiveDocument.Bookmarks.Add Range:=Selection.Range, name:="OpenAt"
ActiveDocument.Save
'ActiveWindow.Caption = ActiveDocument.FullName
InsertDocTitle
End Sub

and a further addition to the autoopen macro

Sub AutoOpen()
'This section is optional
'********************
With ActiveWindow.View
.Type = wdPrintView
.TableGridlines = True
End With
ActiveWindow.ActivePane.View.ShowAll = False

'********************
If ActiveDocument.Bookmarks.Exists("OpenAt") = True Then
ActiveDocument.Bookmarks("OpenAt").Select
End If
'ActiveWindow.Caption = ActiveDocument.FullName
InsertDocTitle
End Sub

Sub InsertDocTitle()
' Changes window title to include path with filename
Dim NameArray As Variant
Dim NameStringL As String
Dim NameStringR As String
Dim Count As Long
Const maxLen = 120 ' set this value to fit your window width
' (avoid error if no active window)
If Windows.Count > 0 Then
NameStringL = ActiveDocument.FullName
If Len(NameStringL) > maxLen Then
' separate the folder names
NameArray = Split(NameStringL, "\")
' check the folder depth
Count = UBound(NameArray)
If Count > 3 Then
NameStringL = NameArray(0) & "\...\"
NameStringR = NameArray(Count)
Count = Count - 1
' continue adding folders to the left of the string
' until you run out of folders or one won't fit
Do While (Count > 0) And _
(Len(NameStringL) + Len(NameStringR) + _
Len(NameArray(Count)) < maxLen)
NameStringR = NameArray(Count) & "\" _
& NameStringR
Count = Count - 1
Loop
NameStringL = NameStringL & NameStringR
End If
End If
' Change the window's caption
ActiveWindow.Caption = NameStringL
End If
End Sub

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Ms-Exl-Learner

Click the Office Ribbon Button (colorful round circle at the top Left
corner)>>Prepare>>Properties.

Remember to Click Yes, if this post helps!
 
J

Jay Freedman

In Word 2003, I could add "Web Address" window to my toolbar so that I could
see the file folder location for any Word document I was working on (dunno
why it was called "Web Address"). I am now using Word 2007, creating a Quick
Access Toolbar. Cannot find "Web Address" in the All Commands list. Has it
been replaced by another "command"? If not, in Word 2007 is there another
way I can quickly see the full file path for a Word document when I have it
open in Word without having to resort to finding it through "File
Properties"? Thank you.

You'll find it in the All Commands list as "Document Location".
 

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