Relative path in LINK field ?

T

Timvdv

I use LINK fields in Word to get data from Excel.
In the LINK fields I have to specify the filename of the excel file as the
data source.
Unfortunately Word uses the full pathname to this file in the Field Code :

{ LINK Excel.Sheet.8 "c:\\User\\temp\\test\\Data.xls" "Sheet1!R2C2" \a \t }

For me this is a problem, I would like to mail both the Document and the
Excel file to other people, and I have no control over where they will save
it.

Is there a way to use relative paths in the LINK field instead of absolutes
paths ?
If I put both the .doc file and the .xls file in the same folder, can I make
this work somehow ?

Thank you,
Timvdv
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?VGltdmR2?=,
Is there a way to use relative paths in the LINK field instead of absolutes
paths ?
No, there definitely is not. Link fields do not support relative paths.
If I put both the .doc file and the .xls file in the same folder, can I make
this work somehow ?
You can create a custom document property and use a DocProperty field in place
of the path in the Link field. Then the user need only change the path in one
place, and update the fields.

Or, you could use an AutoOpen macro to check the path of the current document,
then write that path to the Link field codes.

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 :)
 

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