Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Sesquipedalian Sam Sesquipedalian Sam is offline
external usenet poster
 
Posts: 126
Default Anyway to get just the path without the filename?

I can use the Filename field with the \p switch to get the filename
including the path ({FILENAME \p }).

Is there any way to get just the path without the filename?
  #2   Report Post  
Posted to microsoft.public.word.newusers
JoAnn Paules JoAnn Paules is offline
external usenet poster
 
Posts: 4,241
Default Anyway to get just the path without the filename?

I'm curious: What good is the path without a file name?

--

JoAnn Paules
MVP Microsoft [Publisher]
Tech Editor for "Microsoft Publisher 2007 For Dummies"


"Sesquipedalian Sam" wrote in message
...
I can use the Filename field with the \p switch to get the filename
including the path ({FILENAME \p }).

Is there any way to get just the path without the filename?



  #3   Report Post  
Posted to microsoft.public.word.newusers
Sesquipedalian Sam Sesquipedalian Sam is offline
external usenet poster
 
Posts: 126
Default Anyway to get just the path without the filename?

On Fri, 13 Nov 2009 11:13:10 -0500, "JoAnn Paules"
wrote:


I'm curious: What good is the path without a file name?


I want to display them separately -- either on separate lines or in
separate columns of a table.
  #4   Report Post  
Posted to microsoft.public.word.newusers
Terry Farrell Terry Farrell is offline
external usenet poster
 
Posts: 2,904
Default Anyway to get just the path without the filename?

I am sure you cannot. The \p is a 'field specific' switch (i.e. it only
works with FILENAME).

--
Terry Farrell - MSWord MVP

"Sesquipedalian Sam" wrote in message
...
I can use the Filename field with the \p switch to get the filename
including the path ({FILENAME \p }).

Is there any way to get just the path without the filename?


  #5   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Anyway to get just the path without the filename?

Not with fields, but it is simple enough to achieve with a macro

Sub InsertPath()
With ActiveDocument
If Len(.Path) = 0 Then .Save
Selection.TypeText .Path & "\"
End With
End Sub

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



Sesquipedalian Sam wrote:
I can use the Filename field with the \p switch to get the filename
including the path ({FILENAME \p }).

Is there any way to get just the path without the filename?





  #6   Report Post  
Posted to microsoft.public.word.newusers
Sesquipedalian Sam Sesquipedalian Sam is offline
external usenet poster
 
Posts: 126
Default Anyway to get just the path without the filename?

On Sat, 14 Nov 2009 09:45:13 +0200, "Graham Mayor"
wrote:


Not with fields, but it is simple enough to achieve with a macro

Sub InsertPath()
With ActiveDocument
If Len(.Path) = 0 Then .Save
Selection.TypeText .Path & "\"
End With
End Sub

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


Thank you very much.
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
path and filename BK New Users 6 February 2nd 09 04:31 AM
always include path in filename Jo-Anne[_2_] New Users 1 December 20th 08 11:18 AM
Filename and Path antssistr Microsoft Word Help 4 July 22nd 06 05:33 PM
Filename and path Texas Microsoft Word Help 1 May 2nd 05 03:09 PM
Insert > Autotext is missing "filename" and "filename and path"; how to get back? StargateFan New Users 7 February 7th 05 01:17 AM


All times are GMT +1. The time now is 04:23 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"