Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
tanqueverde tanqueverde is offline
external usenet poster
 
Posts: 1
Default How can I insert the file location path into a Word doc?

I have Office 2000 and I can't find a way to insert the file path into a Word
document. The properties window won't let me copy the file location
information. I'd like a fast way to copy the file location path into some of
my documents prior to printing.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How can I insert the file location path into a Word doc?

Do you want just the filepath or the filepath and docname?
If the former then the following macro will do that:

Sub InsertPath()
Dim pPathname As String
Dim pFoldername As String
With ActiveDocument
If Not .Saved Then
.Save
End If
pPathname = Left$(.FullName, (Len(.FullName) - Len(.Name) - 1))
pFoldername = Right$(pPathname, (Len(pPathname) -
InStrRev(pPathname, "\")))
End With
Selection.TypeText pPathname
End Sub

If you want the latter, use a filename field with a \p switch (there should
be an autotext entry to do this)
or if you prefer the macro approach

Sub InsertFileNameAndPath()
Dim fFname As String
With ActiveDocument
If Not .Saved Then
.Save
End If
fFname = .FullName
End With
Selection.TypeText fFname
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


tanqueverde wrote:
I have Office 2000 and I can't find a way to insert the file path
into a Word document. The properties window won't let me copy the
file location information. I'd like a fast way to copy the file
location path into some of my documents prior to printing.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
challa prabhu challa prabhu is offline
external usenet poster
 
Posts: 77
Default How can I insert the file location path into a Word doc?

Do the following:

1. Click View-Header Footer
2. Click Insert AutoText
3. Click Filename and Path
4. Select All
5. Click Edit-Copy
6. Click Edit- Paste in the document

Challa Prabhu

"tanqueverde" wrote:

I have Office 2000 and I can't find a way to insert the file path into a Word
document. The properties window won't let me copy the file location
information. I'd like a fast way to copy the file location path into some of
my documents prior to printing.

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default How can I insert the file location path into a Word doc?

Insert | Field: FileName. If you want the full path, add the \p switch. Or
select the "Filename and path" AutoText entry from the Header/Footer
category.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"tanqueverde" wrote in message
...
I have Office 2000 and I can't find a way to insert the file path into a

Word
document. The properties window won't let me copy the file location
information. I'd like a fast way to copy the file location path into some

of
my documents prior to printing.


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
I am having difficulty with deleting headers and footers LHD New Users 5 July 24th 06 01:44 AM
Word & WordPerfect MrsMac Microsoft Word Help 5 June 10th 06 03:14 AM
hard space between words. Sandy L Microsoft Word Help 7 May 5th 06 08:25 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 05:32 PM


All times are GMT +1. The time now is 08:44 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"