![]() |
| 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. |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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 | |
|
|
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 |