INCLUDETEXT: Relative Paths Allowed?

P

Paul Moloney

Does the INCLUDETEXT field allow the use of relative paths - for
example, a link to a target file in the same directory as the document,
or one directory below?

Thanks,

P.
 
C

Cindy M -WordMVP-

Hi Paul,
Does the INCLUDETEXT field allow the use of relative paths - for
example, a link to a target file in the same directory as the document,
or one directory below?
Yes... with reservations. Try, for example, "..\\xyz.doc"

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
P

Paul Moloney

Cindy M -WordMVP- said:
Hi Paul,

Yes... with reservations. Try, for example, "..\\xyz.doc"

Hi Cindy,

What are the reservations? Will this functionality only
work sometimes? Or do only links to the directory
below work?

Thanks,

P.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?cGdhZ2dl?=,
Is this possible or is relative links only for paths in the physical
filestructure?
I'm not 100% sure, but I believe that is the case. The technology
behind this field is more than a decade old (IOW before forward-slash
paths were widely used). And the support for relative paths is anyway
kind of shaky.

What you might consider would be to store the actual path in a document
PROPERTY (File/Properties/Custom) and use a DocProperty field nested in
the IncludeText. That would make it much easier to change the path, and
it could be done by a macro internal to Word, or by a script on the
closed file. File properties are exposed and can be accessed using the
tool dsofile.exe available for download at microsoft.com

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
C

Cindy M -WordMVP-

Hi Paul,
What are the reservations? Will this functionality only
work sometimes? Or do only links to the directory
below work?
Some reservations (I may not remember every detail):
- Word has a nasty tendency to switch back to an absolute path.
Especially if the option "Update links on save" is activated in
Tools/Options/General/Web options/File

- relative paths don't work in all fields that rely on paths (not in LINK
fields, for example)

- I don't think it's supported with "forward-slash" types of paths

I also can't recall if all combinations of dots (one dot, two dots, etc.) and
slashes are accepted - you'd have to experiment with this a bit.

Also, see my reply to "pgagge" in this same thread for some thoughts on
alternate approaches.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
P

Paul Moloney

Yes... with reservations. Try, for example, "..\\xyz.doc"

I've tried this with no luck; I've ever tried files
in the _same_ directory. I just downloaded the IncludeText Field
Tutorial by Charles Kyle Kenyon (from
http://www.addbalance.com/word/download.htm), ensuring the three
files comprising the tutorial are in the same directory, and _his_
relative links (for example, IncludeText "IncludeText Source.doc"
MyMark\* CharFormat) don't work for me, giving me an "Error! Not a
valid filename"
error.

I'm using MS Word 2002 SP3, if that's an help.

Cheers.

P.
 
B

Bob S

Does the INCLUDETEXT field allow the use of relative paths - for
example, a link to a target file in the same directory as the document,
or one directory below?

My understanding is as follows, YMMV:

If the document that you wish to include is in the same directory as
the destination document, all you need is the filename.

If they are in different directories, you need a complete pathname,
which makes moving either document awkward.

If you try using a relative path, it will be relative to the current
default document directory, not the actual document directory! A
relative path will work if the File | Open dialog box happened to be
left pointing to the desired subdirectory!

Bob S
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top