Relative Hyperlinks in Word

C

Commish

I have created a document that contains several hyperlinks which I need to be
relative because I also upload this document to the internet and I need the
document to work in both locations. The destination files and the folder
structure are identical in the two locations, so a relative hyperlink should
work. Yet it doesn't.

Every time I create a link in my document, it is created relative to the
document itself. The path in the address field is a relative path and should
work in both locations. Yet when I click OK, Word changes the path to the
full path of the file located on our network drive. Obviously, when it is
posted to the internet, the links dont work for anyone but myself, because
the links point to our secure network which nobody has access to.

I've been reading the posted questions in the Discussion Group and none of
the fixes seem to work for me. Ive tried putting the 'x' in the hyperlink
base area of the properties dialog, but that doesnt work. Ive tried changing
the options to not update links on save. Ive also tried editing the field
code and putting the relative address in quotes. Nothing I am reading on
these posts seem to work.

Can somebody help me out?

Thanks in advance.
Kurt
 
C

Commish

Thanks for the reply. After reading your instructions several times and
beating my head against the wall, I still cannot get it to work. The only
thing I see is "Error! Hyperlink reference not valid" when I press Alt+F9 and
hide the fields. What am I doing wrong? Is there something I am missing
from your other post? Why is something so simple like this so *******
difficult to do?!

The relative path I am trying to use is: _General/Memo G-001.pdf, where
"_General" is the folder and "Memo G-001.pdf" is the file I want the link to
point to.

macropod said:
Hi Kurt,

To see how to implement relative hyperlink paths in Word, check out the solution I've posted at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=670027

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
I have created a document that contains several hyperlinks which I need to be
relative because I also upload this document to the internet and I need the
document to work in both locations. The destination files and the folder
structure are identical in the two locations, so a relative hyperlink should
work. Yet it doesn't.

Every time I create a link in my document, it is created relative to the
document itself. The path in the address field is a relative path and should
work in both locations. Yet when I click OK, Word changes the path to the
full path of the file located on our network drive. Obviously, when it is
posted to the internet, the links dont work for anyone but myself, because
the links point to our secure network which nobody has access to.

I've been reading the posted questions in the Discussion Group and none of
the fixes seem to work for me. Ive tried putting the 'x' in the hyperlink
base area of the properties dialog, but that doesnt work. Ive tried changing
the options to not update links on save. Ive also tried editing the field
code and putting the relative address in quotes. Nothing I am reading on
these posts seem to work.

Can somebody help me out?

Thanks in advance.
Kurt
 
M

macropod

Hi Kurt,

Without the details of the paths between the source and destination files, plus your field coding, I really can't say where the
problem lies.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
Thanks for the reply. After reading your instructions several times and
beating my head against the wall, I still cannot get it to work. The only
thing I see is "Error! Hyperlink reference not valid" when I press Alt+F9 and
hide the fields. What am I doing wrong? Is there something I am missing
from your other post? Why is something so simple like this so *******
difficult to do?!

The relative path I am trying to use is: _General/Memo G-001.pdf, where
"_General" is the folder and "Memo G-001.pdf" is the file I want the link to
point to.

macropod said:
Hi Kurt,

To see how to implement relative hyperlink paths in Word, check out the solution I've posted at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=670027

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
I have created a document that contains several hyperlinks which I need to be
relative because I also upload this document to the internet and I need the
document to work in both locations. The destination files and the folder
structure are identical in the two locations, so a relative hyperlink should
work. Yet it doesn't.

Every time I create a link in my document, it is created relative to the
document itself. The path in the address field is a relative path and should
work in both locations. Yet when I click OK, Word changes the path to the
full path of the file located on our network drive. Obviously, when it is
posted to the internet, the links dont work for anyone but myself, because
the links point to our secure network which nobody has access to.

I've been reading the posted questions in the Discussion Group and none of
the fixes seem to work for me. Ive tried putting the 'x' in the hyperlink
base area of the properties dialog, but that doesnt work. Ive tried changing
the options to not update links on save. Ive also tried editing the field
code and putting the relative address in quotes. Nothing I am reading on
these posts seem to work.

Can somebody help me out?

Thanks in advance.
Kurt
 
C

Commish

lHre is the field coding:
{ HYPERLINK
"file:///O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO%20G-002.PDF" }
That is the path of the file on our network drive. This coding returns an
error of: "Error! Hyperlink reference not valid." I have tried using two
backslashes \\ and a single forward slash / and neither seem to work.

The host file's location is:
O:\\Architecture\\Departmental\\Public\\Memos\\0000 General Change Alerts
Index.mht. So the PDF I want to link to is in a child folder under the
"Memos" folder where the source file is located.

Is this the information you need?

macropod said:
Hi Kurt,

Without the details of the paths between the source and destination files, plus your field coding, I really can't say where the
problem lies.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
Thanks for the reply. After reading your instructions several times and
beating my head against the wall, I still cannot get it to work. The only
thing I see is "Error! Hyperlink reference not valid" when I press Alt+F9 and
hide the fields. What am I doing wrong? Is there something I am missing
from your other post? Why is something so simple like this so *******
difficult to do?!

The relative path I am trying to use is: _General/Memo G-001.pdf, where
"_General" is the folder and "Memo G-001.pdf" is the file I want the link to
point to.

macropod said:
Hi Kurt,

To see how to implement relative hyperlink paths in Word, check out the solution I've posted at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=670027

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

I have created a document that contains several hyperlinks which I need to be
relative because I also upload this document to the internet and I need the
document to work in both locations. The destination files and the folder
structure are identical in the two locations, so a relative hyperlink should
work. Yet it doesn't.

Every time I create a link in my document, it is created relative to the
document itself. The path in the address field is a relative path and should
work in both locations. Yet when I click OK, Word changes the path to the
full path of the file located on our network drive. Obviously, when it is
posted to the internet, the links dont work for anyone but myself, because
the links point to our secure network which nobody has access to.

I've been reading the posted questions in the Discussion Group and none of
the fixes seem to work for me. Ive tried putting the 'x' in the hyperlink
base area of the properties dialog, but that doesnt work. Ive tried changing
the options to not update links on save. Ive also tried editing the field
code and putting the relative address in quotes. Nothing I am reading on
these posts seem to work.

Can somebody help me out?

Thanks in advance.
Kurt
 
P

Peter A

"file:///O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO%20G-002.PDF" }
That is the path of the file on our network drive. This coding returns an
error of: "Error! Hyperlink reference not valid." I have tried using two
backslashes \\ and a single forward slash / and neither seem to work.

The host file's location is:
O:\\Architecture\\Departmental\\Public\\Memos\\0000 General Change Alerts
Index.mht. So the PDF I want to link to is in a child folder under the
"Memos" folder where the source file is located.

Is this the information you need?

Why the double backslashes? You need only 1.
 
M

macropod

-------------------------

Peter A said:
Why the double backslashes? You need only 1.

Peter,

That is not so. Word requires double backslashes, not single backslashes, as stated in the Help file. You can use a single forward
slash, though.

Cheers
 
P

Peter A

Subject: Re: Relative Hyperlinks in Word
From: macropod <[email protected]>
Newsgroups: microsoft.public.word.docmanagement

-------------------------



Peter,

That is not so. Word requires double backslashes, not single backslashes, as stated in the Help file. You can use a single forward
slash, though.

Cheers

Very odd, because I just tried it - inserting a hyperlink to a file on a
network drive and it was all single backward slashes. What am I missing?
 
M

macropod

Hi Peter,

If you select the hyperlink and press Shift-F9, you'll see the field code that creates the hyperlink. The field code will have the
double backslashes as the path separators. This is not the same as the hyperlink's display text, which can have single backslashes.

Cheers
 
M

macropod

Hi Kurt,

What is the path to the Word document you're trying to link from?

What field coding does the hyperlink filed display if you use Insert|Hyperlink and browse to the PDF file's location?

As for:
{HYPERLINK "file:///O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO%20G-002.PDF"}
you might get better results with:
{HYPERLINK "O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO G-002.PDF" }
assuming that '_GENERAL' is a valid folder name and that the source file's name is 'MEMO G-002.PDF' and not 'MEMO%20G-002.PDF'.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
lHre is the field coding:
{ HYPERLINK
"file:///O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO%20G-002.PDF" }
That is the path of the file on our network drive. This coding returns an
error of: "Error! Hyperlink reference not valid." I have tried using two
backslashes \\ and a single forward slash / and neither seem to work.

The host file's location is:
O:\\Architecture\\Departmental\\Public\\Memos\\0000 General Change Alerts
Index.mht. So the PDF I want to link to is in a child folder under the
"Memos" folder where the source file is located.

Is this the information you need?

macropod said:
Hi Kurt,

Without the details of the paths between the source and destination files, plus your field coding, I really can't say where the
problem lies.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
Thanks for the reply. After reading your instructions several times and
beating my head against the wall, I still cannot get it to work. The only
thing I see is "Error! Hyperlink reference not valid" when I press Alt+F9 and
hide the fields. What am I doing wrong? Is there something I am missing
from your other post? Why is something so simple like this so *******
difficult to do?!

The relative path I am trying to use is: _General/Memo G-001.pdf, where
"_General" is the folder and "Memo G-001.pdf" is the file I want the link to
point to.

:

Hi Kurt,

To see how to implement relative hyperlink paths in Word, check out the solution I've posted at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=670027

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

I have created a document that contains several hyperlinks which I need to be
relative because I also upload this document to the internet and I need the
document to work in both locations. The destination files and the folder
structure are identical in the two locations, so a relative hyperlink should
work. Yet it doesn't.

Every time I create a link in my document, it is created relative to the
document itself. The path in the address field is a relative path and should
work in both locations. Yet when I click OK, Word changes the path to the
full path of the file located on our network drive. Obviously, when it is
posted to the internet, the links dont work for anyone but myself, because
the links point to our secure network which nobody has access to.

I've been reading the posted questions in the Discussion Group and none of
the fixes seem to work for me. Ive tried putting the 'x' in the hyperlink
base area of the properties dialog, but that doesnt work. Ive tried changing
the options to not update links on save. Ive also tried editing the field
code and putting the relative address in quotes. Nothing I am reading on
these posts seem to work.

Can somebody help me out?

Thanks in advance.
Kurt
 
C

Commish

The path to the document containing the links is:
O:\\Architecture\\Departmental\\Public\\Memos\\0000 General Change Alerts
Index.mht.

The path to the documents being linked are:
O:\\Architecture\\Departmental\\Public\\Memos\\_General\\

I originally created a hyperlink by using the Insert|Hyperlink dialog from
the pull down menus. I browsed to the PDF file to link to and clicked ok.
The path shown in the address field was exactly how I want it to be, relative
not absolute. Yet when I click OK and hover over the newly created link, the
absolute path shows. When I hit Alt+F9 to show the field code, only the
relative address shows, and it shows a "%20" where the space is in the file
name is. This is the field code copied from my document:

{ HYPERLINK "_General/Memo%20G-001.pdf" }

Ideas?

macropod said:
Hi Kurt,

What is the path to the Word document you're trying to link from?

What field coding does the hyperlink filed display if you use Insert|Hyperlink and browse to the PDF file's location?

As for:
{HYPERLINK "file:///O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO%20G-002.PDF"}
you might get better results with:
{HYPERLINK "O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO G-002.PDF" }
assuming that '_GENERAL' is a valid folder name and that the source file's name is 'MEMO G-002.PDF' and not 'MEMO%20G-002.PDF'.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
lHre is the field coding:
{ HYPERLINK
"file:///O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO%20G-002.PDF" }
That is the path of the file on our network drive. This coding returns an
error of: "Error! Hyperlink reference not valid." I have tried using two
backslashes \\ and a single forward slash / and neither seem to work.

The host file's location is:
O:\\Architecture\\Departmental\\Public\\Memos\\0000 General Change Alerts
Index.mht. So the PDF I want to link to is in a child folder under the
"Memos" folder where the source file is located.

Is this the information you need?

macropod said:
Hi Kurt,

Without the details of the paths between the source and destination files, plus your field coding, I really can't say where the
problem lies.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Thanks for the reply. After reading your instructions several times and
beating my head against the wall, I still cannot get it to work. The only
thing I see is "Error! Hyperlink reference not valid" when I press Alt+F9 and
hide the fields. What am I doing wrong? Is there something I am missing
from your other post? Why is something so simple like this so *******
difficult to do?!

The relative path I am trying to use is: _General/Memo G-001.pdf, where
"_General" is the folder and "Memo G-001.pdf" is the file I want the link to
point to.

:

Hi Kurt,

To see how to implement relative hyperlink paths in Word, check out the solution I've posted at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=670027

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

I have created a document that contains several hyperlinks which I need to be
relative because I also upload this document to the internet and I need the
document to work in both locations. The destination files and the folder
structure are identical in the two locations, so a relative hyperlink should
work. Yet it doesn't.

Every time I create a link in my document, it is created relative to the
document itself. The path in the address field is a relative path and should
work in both locations. Yet when I click OK, Word changes the path to the
full path of the file located on our network drive. Obviously, when it is
posted to the internet, the links dont work for anyone but myself, because
the links point to our secure network which nobody has access to.

I've been reading the posted questions in the Discussion Group and none of
the fixes seem to work for me. Ive tried putting the 'x' in the hyperlink
base area of the properties dialog, but that doesnt work. Ive tried changing
the options to not update links on save. Ive also tried editing the field
code and putting the relative address in quotes. Nothing I am reading on
these posts seem to work.

Can somebody help me out?

Thanks in advance.
Kurt
 
M

macropod

Hi Kurt,

If the field code copied from your document:
{ HYPERLINK "_General/Memo%20G-001.pdf" }
works, then this will work also:
{HYPERLINK "{FILENAME \p}\\..\\_General/Memo%20G-001.pdf" }
remembering, of course, to create the field braces (ie '{ }') with Ctrl-F9.

The fact that the full path appears when you hover over the hyperlink field is of no real consequence - if you copy the files to a
new folder, the displayed links will update to reflect the new path.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
The path to the document containing the links is:
O:\\Architecture\\Departmental\\Public\\Memos\\0000 General Change Alerts
Index.mht.

The path to the documents being linked are:
O:\\Architecture\\Departmental\\Public\\Memos\\_General\\

I originally created a hyperlink by using the Insert|Hyperlink dialog from
the pull down menus. I browsed to the PDF file to link to and clicked ok.
The path shown in the address field was exactly how I want it to be, relative
not absolute. Yet when I click OK and hover over the newly created link, the
absolute path shows. When I hit Alt+F9 to show the field code, only the
relative address shows, and it shows a "%20" where the space is in the file
name is. This is the field code copied from my document:

{ HYPERLINK "_General/Memo%20G-001.pdf" }

Ideas?

macropod said:
Hi Kurt,

What is the path to the Word document you're trying to link from?

What field coding does the hyperlink filed display if you use Insert|Hyperlink and browse to the PDF file's location?

As for:
{HYPERLINK "file:///O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO%20G-002.PDF"}
you might get better results with:
{HYPERLINK "O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO G-002.PDF" }
assuming that '_GENERAL' is a valid folder name and that the source file's name is 'MEMO G-002.PDF' and not 'MEMO%20G-002.PDF'.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Commish said:
lHre is the field coding:
{ HYPERLINK
"file:///O:\\Architecture\\Departmental\\Public\\Memos\\_GENERAL\\MEMO%20G-002.PDF" }
That is the path of the file on our network drive. This coding returns an
error of: "Error! Hyperlink reference not valid." I have tried using two
backslashes \\ and a single forward slash / and neither seem to work.

The host file's location is:
O:\\Architecture\\Departmental\\Public\\Memos\\0000 General Change Alerts
Index.mht. So the PDF I want to link to is in a child folder under the
"Memos" folder where the source file is located.

Is this the information you need?

:

Hi Kurt,

Without the details of the paths between the source and destination files, plus your field coding, I really can't say where
the
problem lies.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Thanks for the reply. After reading your instructions several times and
beating my head against the wall, I still cannot get it to work. The only
thing I see is "Error! Hyperlink reference not valid" when I press Alt+F9 and
hide the fields. What am I doing wrong? Is there something I am missing
from your other post? Why is something so simple like this so *******
difficult to do?!

The relative path I am trying to use is: _General/Memo G-001.pdf, where
"_General" is the folder and "Memo G-001.pdf" is the file I want the link to
point to.

:

Hi Kurt,

To see how to implement relative hyperlink paths in Word, check out the solution I've posted at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=670027

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

I have created a document that contains several hyperlinks which I need to be
relative because I also upload this document to the internet and I need the
document to work in both locations. The destination files and the folder
structure are identical in the two locations, so a relative hyperlink should
work. Yet it doesn't.

Every time I create a link in my document, it is created relative to the
document itself. The path in the address field is a relative path and should
work in both locations. Yet when I click OK, Word changes the path to the
full path of the file located on our network drive. Obviously, when it is
posted to the internet, the links dont work for anyone but myself, because
the links point to our secure network which nobody has access to.

I've been reading the posted questions in the Discussion Group and none of
the fixes seem to work for me. Ive tried putting the 'x' in the hyperlink
base area of the properties dialog, but that doesnt work. Ive tried changing
the options to not update links on save. Ive also tried editing the field
code and putting the relative address in quotes. Nothing I am reading on
these posts seem to work.

Can somebody help me out?

Thanks in advance.
Kurt
 

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