Results 1 to 9 of 9
  1. #1
    MADawson
    Guest

    Replacing hyperlinks

    I have a large documents with many hyperlinks. I would like to find/replace the hyperlinks with unformatted text. I tried Replace/More/Format/Style/Hyperlink in the Find textbox and Replace with: Format/Style/Normal. Seems like this should work, but it doesn't. Any ideas?

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    New Zealand
    Posts
    295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replacing hyperlinks

    Hmmmm I tried it to using Word 2k on Win98 and whilst Word says it has made the change, nothing visible happens. If I try to change to unformatted the text disappears completely.
    A puzzle <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15>

  3. #3
    MADawson
    Guest

    Re: Replacing hyperlinks

    I forgot to mention that I am using Word 2000 on Win NT. Thanks, Mike, I had the same results you had. I'll keep working on it.

  4. #4
    BAM
    Guest

    Re: Replacing hyperlinks

    If the only fields in the document are hyperlinks then use <Ctrl A> to select all and then <Ctrl Shift F9> to unlink the fields.

    Once the hyperlink fields are no longer active they will revert to the style of the paragraph.
    ~~~~~~~~~~~~
    Cheers!

  5. #5
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Oregon, USA
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replacing hyperlinks

    Hi MADawson,

    Are you trying to replace them with unformatted text or trying to unlink them? If you're unlinking them and there are *no* other fields in the text, you can select all and press Ctrl+Shift+F9 to unlink all fields in the selection. If there are other fields, you can write a macro to unlink all Hyperlink fields. If that's the case, then post back and I'm sure someone will help.

    HTH,

    Chris

  6. #6
    MADawson
    Guest

    Re: Replacing hyperlinks

    Thanks, BAM, your solution worked! I am celebrating!

  7. #7
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    New Zealand
    Posts
    295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replacing hyperlinks

    BAM well done you got it.

  8. #8
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Replacing hyperlinks

    Following up on BAM and Chris' suggestion, if you had a document that contained different types of fields, you could use the following macro to 'unlink' only the hyperlinks:

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

  9. #9
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Oregon, USA
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replacing hyperlinks

    Hi Gary,

    Interesting. I had in mind:

    Sub Unlink()

    Dim fldField As Field

    For Each fldField In ActiveDocument.Fields
    If fldField.Type = wdFieldHyperlink Then fldField.Unlink
    Next

    End Sub


    Tested that code against yours. Yours ran a minute faster on a document with 10,000 hyperlinks. :-)

    Chris

Posting Permissions

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