Relative file path

J

Jim

I have an excel spreadsheet that contains calculations and a Word document
that has a number of link references to it within the text of a report.
Everything works fine and the excel sheets show up in the report as another
page with headers and footers and correct page numbers etc.

The problem occurs when I want to copy the two files to another project
subdirectory and then try to make chnges to both. All the links in the Word
document still refer back to the original excel spreadsheet back in the
first project subdirectory. I have to manually repoint all the links to the
new project subdirectory. Is there any way to cause the link to be to a
relative address, that is make it look for the excel file in the same
directory that contains the Word file? I can only figure out how to tell it
absolute addresses of links. Is there a simple way to change the references
(about 75) using vba?

I will also post this in the Word and Excel group..
 
C

Cindy M -WordMVP-

Hi Jim,
Is there any way to cause the link to be to a
relative address, that is make it look for the excel file in the same
directory that contains the Word file?
No, there's no way to make the LINK field (that's what's actually
maintaining the link) use a relative file path; absolute paths are
required.
Is there a simple way to change the references
(about 75) using vba?
That depends on two things: the version of Word, and whether these
linked objects are formatted inline with the text, or with text flow
(InlineShape vs Shape collection). If you press Alt+F9 can you see the
LINK field codes for all these links in the document?

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