How to Remove all Hyperlinks in a Word Document
Contents
What is a Hyperlink?
A hyperlink is a word, phrase, or image that you can click on to jump to a new document or a new section within the current document. Text hyperlinks are often blue and underlined, but not necessarily. When you move the cursor over a hyperlink, whether it is text or an image, the arrow should change to a small hand pointing at the link. When you click it, a new page or place in the current page will open.
There are many ways through which you can remove a single hyperlink or all the hyperlinks in a word document. We are going to explore them in this article.
Remove All Hyperlinks in Current Document with Shortcuts
This is the recommended method because it is simple and time-saving. It is done in two steps.
Step 1: Select the whole document by pressing Ctrl + A
Step 2: Press the following keys simultaneously Ctrl + Shift + F9 to remove all hyperlinks in the current document.
Save your document to accept the changes.
Remove All Hyperlinks in Word with VBA
It is also possible to remove all hyperlinks in the current with VBA. Indeed with the appropriate VBA code you can either remove all the hyperlinks in a current document or remove them in all the open Word documents (this second option is not possible with the shortcut method above).
How to Remove All Hyperlinks in Current Document with VBA
Step 1. Open the Microsoft Visual Basic for Application window. You can do so either by Pressing Alt + F11 keys or activating the Developer mode on your menu bar.
Step 2. Insert a new Module (Click Insert>Module) and then copy and paste the follow VBA code in the Module.
VB code
Sub RemoveAllHyperlinksInCurrentDoc() With ThisDocument While .Hyperlinks.Count > 0 Hyperlinks(1).Delete Wend End With Application.Options.AutoFormatAsYouTypeReplaceHyperlinks = False End Sub
3. Then click the Run button or press F5 key to run the code.
As you can see all hyperlinks in the current Word document have been removed.
How to Remove All Hyperlinks in all Opened Word Documents with VBA
While the previous VBA code removes all hyperlinks in only current document, the following VBA code allows you to remove all hyperlinks in all open documents. This is how you do it.
Step 1. Open the Microsoft Visual Basic for Applications window.
2. Insert a new Module then copy and paste the follow VBA code into the Module.
Sub RemoveTheHyperlinksInAllOpenDocuments() Dim Doc As Document Dim OpenDocName As String For Each Doc In Application.Documents OpenDocName = Doc.Name With Documents(OpenDocName) While .Hyperlinks.Count > 0 Hyperlinks(1).Delete Wend End With Application.Options.AutoFormatAsYouTypeReplaceHyperlinks = False Next Doc End Sub
As you go through the opened documents, you will notice that all hyperlinks have been deleted.
Note: You should be careful when using this code by making sure that only the documents where you want to remove hyperlinks are opened.