Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Remove hyperlinks, en masse (2002)

    I have a huge table - information that originated on the Internet - and it is full of hyperlinks that need to be converted to straight text. Can I do it with Replace or is this going to require a macro or coding?
    Thanks

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Remove hyperlinks, en masse (2002)

    Hyperlinks are a type of Field code. You can convert a field code to its plain text "results" using Ctrl+Shift+F9. If there are no other field codes in your table that you want to preserve, this might be as simple as using Table|Select|Table and pressing Ctrl+Shift+F9 one time. (I tested in Word 2000... XP might be a bit different.)

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Remove hyperlinks, en masse (2002)

    This short macro seems to do the trick
    <pre>Dim i As Integer
    For i = ActiveDocument.Hyperlinks.Count To 1 Step -1
    ActiveDocument.Hyperlinks(i).Range.Text = _
    ActiveDocument.Hyperlinks(i).TextToDisplay
    Next i
    End Sub
    </pre>

    You have to step through the hyperlinks collection backwards, as they stop being hyperlinks after executing this code.

    StuartR

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Kendrick, Idaho, USA
    Posts
    277
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Remove hyperlinks, en masse (2002)

    There is something in the table I cannot see, as all links did not respond the same way. However, between the [CTRL][SHIFT][F9] and the macro, the links are gone (and there were 14 pages with 20+ links per page), so I thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •