' Shut this off, don't need anymore popping up = False With Documents(szOpenDocName) ' Loop while there are hyperlinks afoot! SzOpenDocName = doc.Name ' Remove the hyperlinks from that document ' - Dim doc As Documentĭim szOpenDocName As String ' Loop through all open documents:įor Each doc In Application.Documents ' Store the document name ' Removes all hyperlinks from any open documents ' Text to display is left intact Hyperlinks.Count > 0Įnd With ' Shut this off, don't need anymore popping upĪ = False Next docĮnd SubKillTheHyperlinksInAllOpenDocuments() '. ' Loop while there are hyperlinks afoot! While. ' Remove the hyperlinks from that document With Documents(szOpenDocName)
' Store the document name szOpenDocName = doc.Name Sub ' Loop through all open documents: For Each doc In Application.Documents
#How to remove hyperlink word 2016 code
Copy (Ctrl + C) and Paste (Ctrl + V) the code below in Word’s module window. Click Insert > Module to open a Module window where you can input macro code. You can also set up a macro that removes hyperlinks from all open Word documents by manually entering Visual Basic code instead.įirst, press the Alt + F11 hotkey to open the Visual Basic editor. The Macro Recorder is a handy tool included in Word that enables recording a sequence of selected options and playing back the macro when required. Remove MS Word Hyperlinks From Documents using Macros