View Single Post
  #4   Report Post  
Posted to microsoft.public.word.newusers
AnthonyWerner AnthonyWerner is offline
external usenet poster
 
Posts: 3
Default How do I show path and filename on title bar in Office 2007?

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."

"Graham Mayor" wrote:

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
Word MVP web site http://word.mvps.org



AnthonyWerner wrote:
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.