A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How can I insert the file location path into a Word doc?



 
 
Thread Tools Display Modes
  #1  
Old January 8th 07, 06:40 AM posted to microsoft.public.word.docmanagement
tanqueverde
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.
Ads
  #2  
Old January 8th 07, 07:08 AM posted to microsoft.public.word.docmanagement
Graham Mayor
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  
Old January 8th 07, 08:25 AM posted to microsoft.public.word.docmanagement
challa prabhu
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  
Old January 8th 07, 03:04 PM posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill
external usenet poster
 
Posts: 33,626
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.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
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 20 September 14th 07 04:40 PM
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 04:32 PM


All times are GMT +1. The time now is 11:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.