Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Word Hyperlinks: Actively Updating text

Status
Not open for further replies.

MathewMehrotra

Technical User
Jun 22, 2006
2
CA
I was wondering if there is anyway to make embedded hyperlinks in word that have text that automatically updates based on a style in the document. Basically, Im making a links document with links to a series of other documents; all these documents have title blocks, done in the style "PolicyTitle" and I need the links page to automatically update if there are any changes.
 
Not quite following. Changes to what?

Gerry
 
Like for example:

Say document 1 has title : Policy 1

I want a hyperlink in document two that says "Policy 1" and links to document 1.

However, I want the text of the hyperlink to change if the title changes. Thus, if I change the title to "Policy One" then I want the link to have text "Policy One" instead of "Policy 1
 
There would be no easy way to do this. Document 2 has the hyperlink, and the display text is set. How would Document 2 know that Document 1 has changed?

"Link" is a little bit of a misnomer. Activating Pointer is more accurate. There is no "link" really, in that there is no flow of information.

Again, how would Doc 2 know that Doc 1 changed?

If your links were well designed, using bookmarks, then it COULD be possible - with some fancy coding - to check and update this kind of thing. In Doc 2 you would have to:

1. Put the display text of the hyperlink into a variable
2. Pick up Address of hyperlink
3. Parse out the path and filename into a variable
4. Parse out the bookmark name into a variable
5. OPEN that file (Doc 1)
6. pick up the text of the bookmark
7. compare the display text and the bookmark text
8. if different, copy the current text to a variable
9. close Doc 1
10. if different, edit the hyperlink and change the display text to variable you got from Doc 1.

Is this do-able? Yes. Is it worth it? Maybe. How critical is this? There are some issues with how Word stores hyperlink addresses that would need to be worked out. Unless this was REALLY worth the effort...it seems like a lot of work to achieve this.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top