Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
DianePDavies DianePDavies is offline
external usenet poster
 
Posts: 17
Default Show only relative path in document footer

I am creating a big proposal with many sections and documents. I would like
to have the path+filename in every document's footer - but I would like only
to show the path of the proposal. The fact that the proposal is located in a
structure revealing the project, the country, the continent etc. is not
relevant - and takes up a lot of space in the footer.

Can I somehow subtract the first "levels" of my path before displaying what
I want to show?

I want this in many documents - so I would prefer not to have to make a VBA
function that has to be included in all documents - and as we are several
people working on the project - I cant rely on everybody having the same
normal.dot (or whereever VBA routines could be saved).
--
Diane
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Show only relative path in document footer

You cannot insert parts of fields, so it is not possible to do this without
vba and that vba will need to be stored in a template or add-in to which the
users have access. In the following example and the path:

D:\My Documents\Test\Versions\Odd\Temp\Test1.doc

the macro splits everything after 'Odd' thus:

\Temp\Test1.doc

Sub InsertFileNameAndPartPath()
Dim fFname() As String
With ActiveDocument
If Len(.Path) = 0 Then
.Save
End If
fFname = Split(.FullName, "Odd")
End With
Selection.TypeText fFname(1)
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



DianePDavies wrote:
I am creating a big proposal with many sections and documents. I
would like to have the path+filename in every document's footer - but
I would like only to show the path of the proposal. The fact that the
proposal is located in a structure revealing the project, the
country, the continent etc. is not relevant - and takes up a lot of
space in the footer.

Can I somehow subtract the first "levels" of my path before
displaying what I want to show?

I want this in many documents - so I would prefer not to have to make
a VBA function that has to be included in all documents - and as we
are several people working on the project - I cant rely on everybody
having the same normal.dot (or whereever VBA routines could be saved).



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Show only relative path in document footer

I don't particularly like it, but subject to certain constraints, you
may be able to use the approach described at

http://tips.pjmsn.me.uk/t0004.htm

For Word 2007 you would need
a. a .mdb file at the same location on everyone's drive (I like
c:\i\i.mdb because it keeps the field codes short). This can be an empty
..mdb, i.e. with no tables.

b. a nested field like

{ SET FP { DATABASE \d "c:\\i\\i.mdb" \s "SELECT 'mid('{ FILENAME \p }',
instr(1,'{ FILENAME \p }','propfolder')+len('propfolder')+1)" }

(I would put this at the beginning of the document). All the {} need to
be the special field code brace pairs that you can insert using ctrl-F9.
"propfolder" would need to be the name of the main folder in the proposal.
c. a bookmark field in your footer, e.g.

{ FP }

d. testing for a while to ensure that you don't run into Word hanging
problems before committing to the approach.

Constraints include
a. your path cannot contain single quote characters (and possibly
double quotes)
b. you may find that the result of either the database field or the FP
field starts with a paragraph mark. (see the article)
c. if you can't give everyone's .mdb the identical pathname, you will
end up having to modify files every time they move to a system with a
different pathname. You could deal with this problem by (for example)
putting both the database pathname and propfolder name in something like
Custom Document Properties, using something like

{ SET FP { DATABASE \d "{ DOCPROPERTY mdbpathname }" \s "SELECT 'mid('{
FILENAME \p }', instr(1,'{ FILENAME \p }','{ DOCPROPERTY propfoldername
}')+len('{ DOCPROPERTY propfoldername }')+1)" }

and fixing the DOCPROPERTY names as required, but that's already
becoming a high-maintenance solution.
d. you end up with a dependency on an external file that you'd
probably want to get rid of before final delivery of your proposal
e. see the article for other stuff...


Peter Jamieson

http://tips.pjmsn.me.uk

DianePDavies wrote:
I am creating a big proposal with many sections and documents. I would like
to have the path+filename in every document's footer - but I would like only
to show the path of the proposal. The fact that the proposal is located in a
structure revealing the project, the country, the continent etc. is not
relevant - and takes up a lot of space in the footer.

Can I somehow subtract the first "levels" of my path before displaying what
I want to show?

I want this in many documents - so I would prefer not to have to make a VBA
function that has to be included in all documents - and as we are several
people working on the project - I cant rely on everybody having the same
normal.dot (or whereever VBA routines could be saved).

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
Relative path for subdocuments. Jan Kratochvil Microsoft Word Help 4 June 27th 08 07:34 PM
How do I change footer to only show 1 level of path and file name Rose M Microsoft Word Help 4 January 12th 06 01:40 PM
Relative path links DaveO Microsoft Word Help 0 July 20th 05 06:52 PM
Relative Path in INCLUDETEXT Donna Microsoft Word Help 1 June 12th 05 02:44 AM
relative path within includetext George Lagger Mailmerge 2 January 27th 05 03:15 PM


All times are GMT +1. The time now is 11:43 AM.

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"