![]() |
#1
|
|||
|
|||
![]()
Hello everyone,
I've been asked at work to create a Word document (that will later be sent to a client) with hyperlinks to other documents similar to what is described in this thread. So I created a document with hyperlinks to other files on my local machine then I moved the document and the files to a network drive and, sure enough, the links stopped working as they still pointed to my local computer. Having realized that there's no easy way to do it, I got down to writing a macro based on what macropod suggested. (macropod's macro didn't work for me out of the box even after filling out the missing parts as described in the code comments) And since I'm pretty lousy at VBA, I'm still struggling to make it work. Now that the work day is over and I'm at home, I tried to recreate the problem on my home computer and hopefully continue working on my macro. But to my surprise, I don't have this problem on my home installation of Word. I guess the difference is versions: Word 2007 at work and Word 2010 at home. I created hyperlinks in Word 2010 and Word inserted them with relative paths by default (while at work, only absolute paths worked). I moved the document and the files to another drive on my home computer and the links still work. They point to the relative path. I checked the Field codes, and they ARE relative (unlike what I saw at work). And when you hover over them, they reflect the change of the drive location in the screen tip. Now I'm really confused... |
#2
|
||||
|
||||
![]()
Word does not, and never has, used relative paths.
As for the macro in the link from the other thread, in most cases all you need to do is to install it and, for hyperlinks, you don't even need it. What the solutions there don't address, though, is what the hyperlink display text says. You could end up with the display text suggesting one thing and the actual link doing another. In Word 2010, if you omit the path, the link may resolve to the local folder. That's about as close to a relative path as you'll get.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
RichardP | Word VBA | 6 | 04-26-2012 04:22 AM |
word 2010 problem | ettrick | Word | 0 | 12-01-2011 02:05 PM |
Problem with Word 2010 co authoring | chris200 | Word | 0 | 10-11-2011 06:44 AM |
Word 2010 printing problem | BillyBoy | Word | 0 | 04-23-2010 11:02 AM |
attaching (relative,logical or virtual) path to template word document | wissam | Mail Merge | 0 | 08-04-2009 05:09 AM |