How do I display file name in the toolbar so I can cut/paste it?

R

RobinHood

I'm trying to display the full file name (link) in my WORD 2007 document such
that I can cut and paste it into another Office 2007 document (e.g., Outlook
email message).
 
G

Graham Mayor

The following macro will copy the full name and path of the current document
to the clipboard

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

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

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