Can I set a hyperlink's display text from a document property?
- by themel
I'm trying to make a word document customizable through a document property that contains the base URL of all the links. I've managed to make the links themselves reference the document property like this:
{ HYPERLINK { QUOTE "http://{ DOCPROPERTY Host}/some/path" } }
Changing the document property and updating the files makes the hyperlinks point to the correct URL. However, visually, nothing changes - the old URL is still shown as the display text of the hyperlink. Is there a way to make this work?
Microsoft docs helpfully state
You can edit the display text for the field by typing over it.
but I can't figure out how that is supposed to work - even if I manually type over the hyperlink, it includes the edits in the field code instead of adjusting the display text.
Currently attempting in Word 2002, but 2010 also available.