Hyperlinks defaulting to absolute instead of relative!!!
I have the following VBA code to update a single link that is using a relative address but when the document is saved the address becomes absolute.
I have debugged the code and confirmed that "address" is a relative path.
Sub UpdateLink(address as string)
ChangeFileOpenDirectory ActiveDocument.Path
ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, address:=address, SubAddress:="", ScreenTip:="", TextToDisplay:="Link"
End Sub
I have checked Options->Advanced->Web Options->Update Links on Save = Ticked.
Also once I have created one link programatically in the document any links manually created by the user also become absolute!
Any ideas what I'm doing wrong?
Walter
|