Link (OLE) with relative path

H

Henry

Hi

I have a framework of word documents which all have to link to a generic
word document which is always placed relative to the famework.

I would like to make the link in the documents with a relative path, instead
of the absolute path which is generated when using "paste special/link"
function.

I have tried to modufied the path in the "fields" but I cannot make it work
as expected.

This is what it looks like

{ LINK Word.Document.8 "\\\\Servdk03\\pharma\\LKP08_master\\Stamdata.doc"
"OLE_LINK19" \a \p }


This is what I'm looking for.

{LINK Word.Document.8 "\\..\\..\\..\\Stamdata.doc" "OLE_LINK19" \a \p}


However that doesn't seems to work.
 
H

Henry

Hi Russ

Yes your are right, what does 4 * backslash mean?

I assumend that it meant absolut "root" or something like that.

I don't know anything about the place where the files will be stored, only
it will be stored releative to eachother.

so in it should be ..\..\..\stamdata.doc

regards
Henry
 
R

Russ

Henry,
See below.
Hi Russ

Yes your are right, what does 4 * backslash mean?

A network address normally starts with two backslashes. In a hyperlink
field, apparently, every backslash needs to be preceded (escaped) by a
backslash to tell Word that it is indeed the character backslash that we are
using and not a backslash for formatting the field.
So all the backslashes in a network address in a hyperlink need to be
doubled and you didn't do that in your example you tried.

In a network, I don't know if you can use relative addressing like you can
on the local hard drive system. That's why I suggested trying what you
wanted to use in an Explorer address bar to see if it would work or Windows
would recognize it as network path.
Some other network administrators out there may know how to create a
relative path for a network.
 
H

Henry

--
Henry


Russ said:
Henry,
See below.


A network address normally starts with two backslashes. In a hyperlink
field, apparently, every backslash needs to be preceded (escaped) by a
backslash to tell Word that it is indeed the character backslash that we are
using and not a backslash for formatting the field.
So all the backslashes in a network address in a hyperlink need to be
doubled and you didn't do that in your example you tried.

In a network, I don't know if you can use relative addressing like you can
on the local hard drive system. That's why I suggested trying what you
wanted to use in an Explorer address bar to see if it would work or Windows
would recognize it as network path.
Some other network administrators out there may know how to create a
relative path for a network.

I see.

I have tried double backslash but with no luck.
four backslashes will not be relativ since that means absolute path
\\server\sharesomethingpath and that'll ruin the relative path ;o)

Does anyone know if OLE links supports relative path and in case it does,
what is the correct syntax??

BR
Henry
 

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