1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Word 2000: Remove hyperlinks from document

Discussion in 'Other PC Software' started by maxmangion, 2003/05/15.

Thread Status:
Not open for further replies.
  1. 2003/05/15
    maxmangion

    maxmangion Inactive Thread Starter

    Joined:
    2002/08/13
    Messages:
    252
    Likes Received:
    0
    I have a document in Word 200 which contains a lot of hyperlinks. Now i need to remove all these hyperlinks from this document, but deleting each hyperlink one by one is very time consuming. Is there a way to remove all the hyperlinks in one step ?

    Thanks!

    p.s. pls note that i just want te remove the hyperlink and not the entire text

    eg if the word "index" is hyperlinked to a document ... i just want to remove the hyperlink to that document leaving the word "text" as plain text.
     
    Last edited: 2003/05/15
  2. 2003/05/15
    Arie

    Arie Administrator Administrator Staff

    Joined:
    2001/12/27
    Messages:
    15,174
    Likes Received:
    412
    Copy the complete text to Notepad, then back to Word.... you'll loose all formatting too though...
     
    Arie,
    #2

  3. to hide this advert.

  4. 2003/05/15
    maxmangion

    maxmangion Inactive Thread Starter

    Joined:
    2002/08/13
    Messages:
    252
    Likes Received:
    0
    thx for the tip.
     
  5. 2003/05/15
    alwitnohumor

    alwitnohumor Inactive

    Joined:
    2003/01/17
    Messages:
    10
    Likes Received:
    0
    Try This

    Create a Macro -- I called mine DeleteHyperlinks
    In the macro, first go to the top of the page then use the GoTo and choose field and hyperlink for your arguments then finally next. Assign your macro to a shortcut or button and use repeatedly as needed. My example code is below.

    Sub DeleteHyperlinks()
    '
    ' DeleteHyperlinks Macro
    ' Macro recorded 5/15/2003 by Al Whitson
    '
    Selection.HomeKey Unit:=wdStory
    Selection.GoTo What:=wdGoToField, Which:=wdGoToNext, Count:=1, Name:= _
    "HYPERLINK "
    Selection.Find.ClearFormatting
    With Selection.Find
    .Text = "^d "
    .Replacement.Text = " "
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Delete Unit:=wdCharacter, Count:=1
    End Sub

    Hope this helps.

    AlWitNoHumor
    :)
     
  6. 2003/05/15
    alwitnohumor

    alwitnohumor Inactive

    Joined:
    2003/01/17
    Messages:
    10
    Likes Received:
    0
    And Just in Case You Want To Get Fancy

    Thought I would add a looping version for you. See code below.

    Sub DeleteHyperlinks()
    Do While ActiveDocument.Hyperlinks.Count > 0
    Selection.HomeKey Unit:=wdStory
    Selection.GoTo What:=wdGoToField, Which:=wdGoToNext, Count:=1, Name:= _
    "HYPERLINK "
    Selection.Find.Text = "^d "
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Delete Unit:=wdCharacter, Count:=1
    Selection.Find.Execute
    Loop
    End Sub

    AlWitNo Humor
     
  7. 2003/05/16
    maxmangion

    maxmangion Inactive Thread Starter

    Joined:
    2002/08/13
    Messages:
    252
    Likes Received:
    0
    great idea .... Thanks very much :)
     
  8. 2003/05/16
    maxmangion

    maxmangion Inactive Thread Starter

    Joined:
    2002/08/13
    Messages:
    252
    Likes Received:
    0
    hi ppl, i've also found this little trick to avoid using macros.

    instead of copy&paste to notepad as someone suggested before i did the same but copy&paste to wordpad instead ... this kept all text formatting but removing all the hyperlinks. then copy&paste back to the word document.

    Hope this might be useful to others as well.
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.