I want to delete multiple hyperlinks in one stroke

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

By selecting a text which contains many hyperlinks, how we can delete all the
hyperlinks by a single command
 
I'm assuming you want to unlink rather than actually delete the hyperlinks.
If the hyperlinks are the only fields in the document, you can unlink them
at a stroke with Ctrl+A, Ctrl+Shift+F9. It's unlikely, though, that the
document does not contain other fields, so here's another way:

1. Press Alt+F9 to display field codes.

2. Press Ctrl+F to open the Find dialog.

3. In the "Find what" box, type ^19 HYPERLINK.

4. Check the box for "Highlight all items found."

5. Click Find All. This will select all the hyperlinks in the document.

6. Click on the document's title bar to return focus to the document window.

7. If you just want to unlink all the hyperlinks, press Ctrl+Shift+F9. If
you really want to delete them, press Delete.

8. Don't forget to press Alt+F9 to toggle field display from field codes
back to field results.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Try running the following macro:

Sub ChangeHyperlinkField()
Dim iFld As Integer
Dim strCodes As String
Selection.HomeKey
strCodes = ActiveDocument.ActiveWindow.View.ShowFieldCodes
ActiveDocument.ActiveWindow.View.ShowFieldCodes = True
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
.Unlink
End With
Next iFld
ActiveDocument.ActiveWindow.View.ShowFieldCodes = strCodes
End Sub


Hope it helps.
 

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

Back
Top