• Removing Hyperlinks

    Author
    Topic
    #351527

    I have a long Word document (250 pages) with many hyperlinks (mainly created from pastes from HTML pages). How do I remove ALL hyperlinks from a document. Or, how can I search the document for the next Hyperlink?
    Thanks for your help.
    Peter

    Viewing 0 reply threads
    Author
    Replies
    • #508764

      Hi, Peter…
      Best way… Key Alt+F9, which shows the field code text, instead of the code results. Then you can search (Edit/Search, or Ctrl+F9) for ‘^dhyper’ (without the quotes) repeatedly. As you reach each one, click in the document and you can convert the field result into hard text by pressing Ctrl+Shift+F9.

      Personally, I’d record a simple macro to do the job so I just have to keep clicking a button until it’s through…

      One of the VBA’ers around here I’m certain can give you a real quick coding for it.

      Have a blast!

      • #508765

        Thanks Karen. It worked a treat, although the replace text has to be ‘^d hyper’ (note the space). I never knew ^d for searching fields. Now if Word just had regular expressions, I could do a replace without having to create a macro…

        • #508777

          If you break down and decide to use a macro, this should do it for you:

          Sub DeleteHLinks()
          Dim n As Long
          Dim lngHypCt As Long
          Dim objDocHyps As Hyperlinks
          Set objDocHyps = ActiveDocument.Hyperlinks
          
          lngHypCt = objDocHyps.Count
          For n = lngHypCt To 1 Step -1
              objDocHyps(n).Delete
          Next n
          End Sub
          

          Saves all that clicking!

          Gary

    Viewing 0 reply threads
    Reply To: Removing Hyperlinks

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: