How to select and copy all hyperlinks from a Word document?
If you have a long Word document with multiple hyperlinks and need to copy them all at once, manually selecting each one can be time-consuming. Fortunately, there are efficient ways to extract and copy all hyperlinks or just their addresses. This guide will introduce different methods to accomplish this quickly.
Copy all hyperlinks to a new document using VBA
Using VBA, you can extract all hyperlinks from a document and copy them into a new document.
- Open the Word document containing the hyperlinks and press Alt + F11 to open the Microsoft Visual Basic for Applications window.
- Click Insert > Module, then copy and paste the following VBA code into the module window:
Sub HyperlinksExtract() 'Updateby20140214 Dim oLink As Hyperlink Dim docCurrent As Document 'current document Dim docNew As Document 'new document Dim rngStory As StoryRanges Set docCurrent = ActiveDocument Set docNew = Documents.Add For Each oLink In docCurrent.Hyperlinks oLink.Range.Copy docNew.Activate Selection.Paste Selection.TypeParagraph Next Set docNew = Nothing Set docCurrent = Nothing End Sub
- Click the Run button to execute the VBA code. A new document will open containing all hyperlinks from the original document.
>>>
Note: This VBA method works only for text-based hyperlinks. It does not extract hyperlinks embedded in images.
Extract only hyperlink addresses (plain text) to a new document using VBA
This VBA method extracts only the hyperlink addresses from a document and pastes them into a new document.
- Open the Word document and press Alt + F11 to open the VBA editor.
- Click Insert > Module, then copy and paste the following VBA code:
Function GetAllHyperlinks() 'Updateby20140214 Dim docCurrent As Document Dim docNew As Document Dim oLink As Hyperlink Dim rng As Range Application.ScreenUpdating = False Set docCurrent = ActiveDocument Set docNew = Documents.Add For Each oLink In docCurrent.Hyperlinks Set rng = docNew.Range rng.Collapse rng.InsertParagraph rng.InsertAfter (oLink.Address) Next docNew.Activate Application.ScreenUpdating = True Application.ScreenRefresh End Function
- Click the Run button. A new document will be created containing only the hyperlink addresses (plain text).
>>>
Note: The extracted hyperlink addresses may not appear in the same order as in the original document.
Copy hyperlinks or addresses to clipboard using Kutools for Word
Kutools for Word provides a simple way to copy all hyperlinks or just their addresses to the clipboard with a few clicks.
- Click Kutools Plus > Copy Hyperlink.
- In the Copy all hyperlinks to clipboard dialog box, select the desired option.
- Paste the copied hyperlinks wherever you want by pressing Ctrl + V.
- If you select the Hyperlinks option, both the display text and the hyperlink will be copied.
- If you select the Hyperlink Addresses option, only the hyperlink address will be copied as plain text.
Demo: Copy All Hyperlinks in a Word Document
Discover the Kutools / Kutools Plus tab in this video from Kutools for Word. Enjoy 100+ features and permanently free AI utilities. Download now!
Tabbed Browsing & Editing for Multiple Word Documents/Excel Workbooks, Just Like in Chrome and Edge! |
Just like browsing multiple webpages in Chrome, Safari and Edge, Office Tab lets you open and manage multiple Word documents or Excel workbooks in one Word window or Excel window. Switching between documents or workbooks is now simple with a click on their tabs! |
Related Articles:
- Insert, remove and list all hyperlinks of current document in Word
- Insert multiple hyperlinks to a document in Word
- Remove all hyperlinks in Word
Best Office Productivity Tools
Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!
π€ Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish (Preserve Format) / Super Translate (Preserve Format) / AI Redaction / AI Proofread...
π Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/HTML...) / Batch Convert to PDF...
β Contents Editing: Batch Find and Replace across Multiple Files / Resize All Pictures / Transpose Table Rows and Columns / Convert Table to Text...
π§Ή Effortless Clean: Sweap away Extra Spaces / Section Breaks / Text Boxes / Hyperlinks / For more removing tools, head to the Remove group...
β Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Multiple Pictures / Discover more in the Insert group...
π Precision Selections: Pinpoint Specific Pages / Tables / Shapes / Heading Paragraphs / Enhance navigation with more Select features...
β Star Enhancements: Navigate to Any Location / Auto-Insert Repetitive Text / Toggle Between Document Windows / 11 Conversion Tools...
π Supports 40+ Languages: Use Kutools in your preferred language β supports English, Spanish, German, French, Chinese, and 40+ others!

β¨ Kutools for Office β One Installation, Five Powerful Tools!
Includes Office Tab Pro Β· Kutools for Excel Β· Kutools for Outlook Β· Kutools for Word Β· Kutools for PowerPoint
π¦ Get all 5 tools in one suite | π Seamless integration with Microsoft Office | β‘ Save time and boost productivity instantly
Best Office Productivity Tools
Kutools for Word - 100+ Tools for Word
- π€ Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish / Super Translate / AI Redaction / AI Proofread
- π Document Mastery: Split Pages / Merge Documents / Batch Convert to PDF
- β Contents Editing: Batch Find and Replace / Resize All Pictures
- π§Ή Effortless Clean: Remove Extra Spaces / Remove Section Breaks
- β Creative Inserts: Insert Thousand Separators / Insert Check Boxes / Create QR Codes
- π Supports 40+ Languages: Kutools speaks your language β 40+ languages supported!