How do I show path and filename on title bar in Office 2007?

  • Thread starter Thread starter AnthonyWerner
  • Start date Start date
A

AnthonyWerner

You could do this in Office 2003. This provided something that looked like a
web address, enabling you to copy and paste the complete path/filename.
 
There are no toolbars inj Word 2007, so it is not possible to add the web
toolbar to which you refer. If the aim of the exercise is to copy the
filename and path to the clipboard, then the following macro will do that

Sub CopyFileNameAndPath()
Dim dFname As DataObject
Dim fFname As String
Set dFname = New DataObject
With ActiveDocument
' If Len(.Path) = 0 Then .Save
fFname = .FullName
End With
dFname.SetText fFname
dFname.PutInClipboard
End Sub

Removing the apostrophe from the start of the line
' If Len(.Path) = 0 Then .Save
will ensure that the document is saved before you copy the filename.

http://www.gmayor.com/installing_macro.htm

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Don't know if this is what you are looking for, but you can:

-- right click the Office button
-- select "customize Quick Access Toolbar"
-- change "popular commands" to "all commands"
-- add "document location" to the QAT

The entire path and filename will appear on the QAT. You cannot resize the
button; however, you can double click inside that button to select the
entire path and filename. Then CTRL + C will copy it to the clipboard and
you can paste it wherever you want.
 
Thanks for a creative workaround. This required I figure out where to find
the Macros in Word 2007 (the learning curve continues).

The script quite with an error "user-defined data type undefined."
 
The link I posted explains how to install macros from listings in Word 2007,
however the error is another matter. The macro requires a reference to
Microsoft Forms 2.0. From the vba editor (ALT+F11) Tools > References, see
if Microsoft Forms 2.0 is listed. If not browse from that dialog to attempt
to locate FM20.DLL in the C:\WINDOWS\system32 folder. If missing, you will
need to download FM20.DLL from one of the web sources where it is available
and install it in the above mentioned folder.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top