Making all hyperlinks relative

  • Thread starter christophercbrewster via OfficeKB.com
  • Start date
C

christophercbrewster via OfficeKB.com

My previous posting concerned finding fields. My main goal is to change all
my hyperlinks to be relative. They are copied from Excel and are absolute,
even when I first make them relative in Excel. Can someone suggest an
approach to this? I haven't been able to access the field value using code so
that I can change it. Maybe the right approach would make my previous
question unnecessary (?). I hope.

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200911/1
 
C

christophercbrewster via OfficeKB.com

I think I've answered my own question. I used this code:

Public Sub ModifyHyperlink()
For Each hypLink In ActiveDocument.Hyperlinks
strLinkPath = hypLink.Address
MsgBox strLinkPath
Next
End Sub

When this runs, the path shown in the message is relative. So maybe there's
nothing to do. But when I use Ctrl-K on a link, it's absolute. Maybe someone
can explain how this works. Thanks.

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200911/1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top