Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I use hyperlink base?
I want to use an environment variable as a htperlink base in Word and Excel.
For example a variable DOCUMENTS may be set as c:\mystuff\documents and then a hyperlink would be relative to it in a document. If I use c:\mystuff\documents as the hyperlink base it is fine, but I can't see how to use the variable DOCUMENTS. %DOCUMENTS% doesn't seem to work. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I use hyperlink base?
Hi Chris:
The hyperlink base you set needs to be the complete path in Internet format including the protocol identifier. For hyperlink base to work, all the target documents need to be in the same folder. You can't use a combination: it's either hyperlink base plus file name (only), or you need the full explicit path and file name. You can't have a hyperlink base + folder name + file name. I suggest that what you "actually" want is NO hyperlink base. By default, Word writes relative hyperlinks. Cheers On 30/3/06 6:54 PM, in article , "ChrisB" wrote: I want to use an environment variable as a htperlink base in Word and Excel. For example a variable DOCUMENTS may be set as c:\mystuff\documents and then a hyperlink would be relative to it in a document. If I use c:\mystuff\documents as the hyperlink base it is fine, but I can't see how to use the variable DOCUMENTS. %DOCUMENTS% doesn't seem to work. -- Please reply to the newsgroup to maintain the thread. Please do not email me unless I ask you to. John McGhie Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I use hyperlink base?
Thanks,
However, setting no base adds a hyperlink ralative to my computer, it inserts c:\etc ..., this will not be the same on other peoples machines. "John McGhie [MVP - Word and Word Macinto" wrote: Hi Chris: The hyperlink base you set needs to be the complete path in Internet format including the protocol identifier. For hyperlink base to work, all the target documents need to be in the same folder. You can't use a combination: it's either hyperlink base plus file name (only), or you need the full explicit path and file name. You can't have a hyperlink base + folder name + file name. I suggest that what you "actually" want is NO hyperlink base. By default, Word writes relative hyperlinks. Cheers On 30/3/06 6:54 PM, in article , "ChrisB" wrote: I want to use an environment variable as a htperlink base in Word and Excel. For example a variable DOCUMENTS may be set as c:\mystuff\documents and then a hyperlink would be relative to it in a document. If I use c:\mystuff\documents as the hyperlink base it is fine, but I can't see how to use the variable DOCUMENTS. %DOCUMENTS% doesn't seem to work. -- Please reply to the newsgroup to maintain the thread. Please do not email me unless I ask you to. John McGhie Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I use hyperlink base?
Thanks I will try that. It seems to me that it would be much more useful for
Word, and all the other Office programmes to use environment variables as a possible hyperlink base. "John McGhie [MVP - Word and Word Macinto" wrote: Once the hyperlinks are in the document, reveal your field codes, then use Find/Replace to remove the path, leaving just the file name. Word won't put it back in. This technique requires that all the linked files be in the same folder as the document. Alternatively, save the document on the server before you add the hyperlinks. That way, the links ought to be correct on anyone's computer. cheers On 3/4/06 5:21 PM, in article , "ChrisB" wrote: Thanks, However, setting no base adds a hyperlink ralative to my computer, it inserts c:\etc ..., this will not be the same on other peoples machines. "John McGhie [MVP - Word and Word Macinto" wrote: Hi Chris: The hyperlink base you set needs to be the complete path in Internet format including the protocol identifier. For hyperlink base to work, all the target documents need to be in the same folder. You can't use a combination: it's either hyperlink base plus file name (only), or you need the full explicit path and file name. You can't have a hyperlink base + folder name + file name. I suggest that what you "actually" want is NO hyperlink base. By default, Word writes relative hyperlinks. Cheers On 30/3/06 6:54 PM, in article , "ChrisB" wrote: I want to use an environment variable as a htperlink base in Word and Excel. For example a variable DOCUMENTS may be set as c:\mystuff\documents and then a hyperlink would be relative to it in a document. If I use c:\mystuff\documents as the hyperlink base it is fine, but I can't see how to use the variable DOCUMENTS. %DOCUMENTS% doesn't seem to work. -- Please reply to the newsgroup to maintain the thread. Please do not email me unless I ask you to. John McGhie Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 -- Please reply to the newsgroup to maintain the thread. Please do not email me unless I ask you to. John McGhie Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I use hyperlink base?
I have tried this. revealing the field codes does indeed show a relative
path. However if you hover over the link (or indeed use the link) it resolves to an incorrect place. I created a file in directory bert called fred.doc. At the same level there is a folder ethel, this has another document inside. In fred I created a hyperlink to the document in ethel. On someone elses machine, where the base folder is called notbert, the hyperlink tried to load c:\bert\ethel\thedocument (correct on my machine), rather than c:\notbert\etthel\thedocument. "John McGhie [MVP - Word and Word Macinto" wrote: Once the hyperlinks are in the document, reveal your field codes, then use Find/Replace to remove the path, leaving just the file name. Word won't put it back in. This technique requires that all the linked files be in the same folder as the document. Alternatively, save the document on the server before you add the hyperlinks. That way, the links ought to be correct on anyone's computer. cheers On 3/4/06 5:21 PM, in article , "ChrisB" wrote: Thanks, However, setting no base adds a hyperlink ralative to my computer, it inserts c:\etc ..., this will not be the same on other peoples machines. "John McGhie [MVP - Word and Word Macinto" wrote: Hi Chris: The hyperlink base you set needs to be the complete path in Internet format including the protocol identifier. For hyperlink base to work, all the target documents need to be in the same folder. You can't use a combination: it's either hyperlink base plus file name (only), or you need the full explicit path and file name. You can't have a hyperlink base + folder name + file name. I suggest that what you "actually" want is NO hyperlink base. By default, Word writes relative hyperlinks. Cheers On 30/3/06 6:54 PM, in article , "ChrisB" wrote: I want to use an environment variable as a htperlink base in Word and Excel. For example a variable DOCUMENTS may be set as c:\mystuff\documents and then a hyperlink would be relative to it in a document. If I use c:\mystuff\documents as the hyperlink base it is fine, but I can't see how to use the variable DOCUMENTS. %DOCUMENTS% doesn't seem to work. -- Please reply to the newsgroup to maintain the thread. Please do not email me unless I ask you to. John McGhie Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 -- Please reply to the newsgroup to maintain the thread. Please do not email me unless I ask you to. John McGhie Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
How do I use hyperlink base?
You have to make two passes with Find/Replace, once for the display text and
once for the field code; see http://sbarnhill.mvps.org/WordFAQs/HyperlinkProbs.htm -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "ChrisB" wrote in message ... I have tried this. revealing the field codes does indeed show a relative path. However if you hover over the link (or indeed use the link) it resolves to an incorrect place. I created a file in directory bert called fred.doc. At the same level there is a folder ethel, this has another document inside. In fred I created a hyperlink to the document in ethel. On someone elses machine, where the base folder is called notbert, the hyperlink tried to load c:\bert\ethel\thedocument (correct on my machine), rather than c:\notbert\etthel\thedocument. "John McGhie [MVP - Word and Word Macinto" wrote: Once the hyperlinks are in the document, reveal your field codes, then use Find/Replace to remove the path, leaving just the file name. Word won't put it back in. This technique requires that all the linked files be in the same folder as the document. Alternatively, save the document on the server before you add the hyperlinks. That way, the links ought to be correct on anyone's computer. cheers On 3/4/06 5:21 PM, in article , "ChrisB" wrote: Thanks, However, setting no base adds a hyperlink ralative to my computer, it inserts c:\etc ..., this will not be the same on other peoples machines. "John McGhie [MVP - Word and Word Macinto" wrote: Hi Chris: The hyperlink base you set needs to be the complete path in Internet format including the protocol identifier. For hyperlink base to work, all the target documents need to be in the same folder. You can't use a combination: it's either hyperlink base plus file name (only), or you need the full explicit path and file name. You can't have a hyperlink base + folder name + file name. I suggest that what you "actually" want is NO hyperlink base. By default, Word writes relative hyperlinks. Cheers On 30/3/06 6:54 PM, in article , "ChrisB" wrote: I want to use an environment variable as a htperlink base in Word and Excel. For example a variable DOCUMENTS may be set as c:\mystuff\documents and then a hyperlink would be relative to it in a document. If I use c:\mystuff\documents as the hyperlink base it is fine, but I can't see how to use the variable DOCUMENTS. %DOCUMENTS% doesn't seem to work. -- Please reply to the newsgroup to maintain the thread. Please do not me unless I ask you to. John McGhie Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 -- Please reply to the newsgroup to maintain the thread. Please do not me unless I ask you to. John McGhie Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer Sydney, Australia +61 (0) 4 1209 1410 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word Hyperlink: Opening & Returning | Microsoft Word Help | |||
Pasting a hyperlink into a document | Microsoft Word Help | |||
Using hyperlink base seems to break the TOC | Microsoft Word Help | |||
Hyperlink base | Microsoft Word Help | |||
Using MAILMERGE fields within HYPERLINK fields for Merge to Email | Mailmerge |