Word changing hyperlinks from relative to absolute

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

Hi, I have a problem with Word 2007. When I insert relative hyperlinks in a
Word document to other files they keep changing from relative to absolute. I
think it happens when I select File|Save As. I now have a document with
hundreds of hyperlinks in it that will not work when the Word file and its
hyperlinked files are moved into a different folder. With the field codes
showing I have done a find and replace to remove the file path from the
hyperlink, but when I check the hyperlink edit window it still shows the
full path. Is there any way to change all these hyperlinks back to relative
and stop them changing again. Thanks, Rob
 
This is a longstanding problem with Word. My experience is that the links
don't update when you save but when you reopen the file. If there's a
solution, I never found it.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
Hi Rob,

Word's field links (hyperlink, includetext, includepicture, link, rd) always use absolute paths and that's what you're getting, not
relative paths. Even if you remove the path from the field code, it's still there in the document metacode. What you need for what
you've described is relative paths.

To see how to implement relative paths in Word, check out the solution I've posted at:
http://lounge.windowssecrets.com/index.php?showtopic=670027
 
Hi Suzanne and macropod. Thanks for the info. I have done a bit more
trial and error research myself and have the following findings:
1. The problem always happens on Save As, never on Save or on
reopening a file.
2. Unchecking the "update automatic links at open" has no effect
3. Unchecking "update links on save" inside Word Options | Advanced |
Web options | Files DOES stop the problem.

I can now insert a hyperlink, save as, close, open and the relative
hyperlink is intact. The field code does not contain a file path, nor
does the address in the Edit Hyperlink window.

So this may be part of the answer (at least until someone opens the
file on another computer). However, I am still left with hundreds of
hyperlinks in my document that have a filepath in the address in the
Edit Hyperlink window but not in the field code. Can anyone suggest a
fast way to remove these filepaths? macropod I'm sorry if that is what
you have already suggested with your link - after reading it I was
unsure.

Many thanks
Rob
 
Hi Rob,

If you press Alt-F9 to expose the field codes, you can use a Find/Replace operation to modify the file paths in the hyperlink
fields.

The solution in the link I referred to works by replacing the file path in the field with a filename field, plus some path
delimiters. Again, you could use a Find/Replace operation to replace the file paths in the hyperlink fields with the filename field
& path delimiters. To do this:
1. create a filename field and the path delimiters. To do this:
.. a. press Ctrl-F9 to create a pair of field braces (ie '{}')
.. b. type FILENAME \p between the field braces, thus '{FILENAME \p}'
.. c. add the path delimiters, so that you end up with '{FILENAME \p}\\..\\'
2. copy the filepath from a hyperlink field and paste it into the Find expression in the Find/Replace dialogue box, then do a 'Find'
3. cut the filename field and the path delimiters from the document
4. open the Find/Replace dialogue box and type '^c' into the Replace expression in the Find/Replace dialogue box
5. Click 'replace all'.

If you've got hyperlink fields without the file path, you'll need to add the filename field and the path delimiters to those fields.
 
Rob,
I was searching for a solution to the same problem and the solution from suzanne also works to remove the absolute fields:
- Press Alt-F9 to expose all field codes
- Copy the filepath that exist in all hyperlinks (leaving the first ") into the "Find what" in the Replace box, leaving the "Replace with" empty
- The "Replace All" removes all the absolute files
Knut
 
Hi Suzanne and macropod. Thanks for the info. I have done a bit more
trial and error research myself and have the following findings:
1. The problem always happens on Save As, never on Save or on
reopening a file.
2. Unchecking the "update automatic links at open" has no effect
3. Unchecking "update links on save" inside Word Options | Advanced |
Web options | Files DOES stop the problem.

I can now insert a hyperlink, save as, close, open and the relative
hyperlink is intact. The field code does not contain a file path, nor
does the address in the Edit Hyperlink window.

So this may be part of the answer (at least until someone opens the
file on another computer). However, I am still left with hundreds of
hyperlinks in my document that have a filepath in the address in the
Edit Hyperlink window but not in the field code. Can anyone suggest a
fast way to remove these filepaths? macropod I'm sorry if that is what
you have already suggested with your link - after reading it I was
unsure.

Many thanks
Rob
I am working in Word 2013 and find the hyperlink changes to show the long file names rather than the short "intra-document" file name after saving and reopening. I unchecked the "
"update links on save" inside Word Options | Advanced |Web options | ....but without any change. I edited the hyperlinks (some of them) back to the short version after unchecking updating links on save - saving the doc, reopening and voila' ! I get the same long version complete with where it is all stored ... ??

Help please?
 
I have an answer on another thread, I guess - so here goes with the answer here.

After you have your hyperlinks set as you want them - regardless of whether or not you have the long name with folder, sub-folder, file locations or the "intra-document" short name - If you right click on the hyperlink, click on edit, select screen tip and type in what you want to show when you hover over the hyper link - THEN, you can save, reopen and your hyperlink displays whatever you typed in the screen tip dialog box.

Now why there is not an automatic select feature to accomplish this for you... I dunno...

cal twitty
 
Back
Top