Word Select Copy All Hyperlinks? How To
This article explains how to select, copy, and extract all hyperlinks from a Microsoft Word document at once. You’ll learn the built-in methods, a simple workaround using Find and Replace, and how to handle both Windows and Mac versions of Word.
Why You Might Need to Copy All Hyperlinks
Word documents often contain many hyperlinks—sources, references, or URLs embedded in text. Manually copying each link is tedious and error-prone, especially in long documents. You might need the list of URLs for a bibliography, a webmaster, or to check for broken links. Fortunately, Word provides a few ways to extract all hyperlinks without copying them one by one.
Method 1: Using Find and Replace (Works in Most Versions)
This is the quickest method that works in Word 2010, 2013, 2016, 2019, 2021, and Microsoft 365. It involves using the built-in Find and Replace feature with a special wildcard to capture hyperlink addresses.
- Press Ctrl + H to open the Find and Replace dialog.
- Click the More >> button to expand options.
- Check the box next to Use wildcards.
- In the Find what field, type:
<HYPERLINK "*" - In the Replace with field, type:
&(this keeps the found text, but you’ll actually replace it with nothing later). - Click Replace All. This will temporarily replace each hyperlink code with itself, but it also selects all matching text.
- Now press Esc to close the dialog.
- Press Ctrl + C to copy the selected text.
- Paste into a new document or text editor.
This method copies the hyperlink field codes, which include the URLs in quotes. You can then use Find and Replace again to remove the surrounding text if needed.
Method 2: Using Word’s Built-in “Edit Links� (For Embedded Links)
If your document contains hyperlinks that are linked to external files (like Excel charts), you can use the Edit Links feature. This is not for regular web hyperlinks, but for OLE links.
- Click the File tab.
- Click Info.
- At the bottom, click Edit Links to Files (this appears only if the document has such links).
- A dialog shows all external links. You can select them and copy the source path.
This method does not work for normal web hyperlinks (like https://example.com).
Method 3: Using a Macro (For Advanced Users)
If you frequently need to extract hyperlinks, a simple VBA macro can do it in one click. This is a more permanent solution.
- Press Alt + F11 to open the VBA editor.
- Click Insert > Module.
- Paste the following code:
Sub ExtractHyperlinks()
Dim doc As Document
Dim hl As Hyperlink
Dim output As String
Set doc = ActiveDocument
For Each hl In doc.Hyperlinks
output = output & hl.Address & vbCrLf
Next hl
' Create a new document and paste the list
Documents.Add
Selection.TypeText output
End Sub
- Press F5 to run the macro. It creates a new document with only the URLs, one per line.
This is the most reliable method for extracting just the URLs without any extra text.
How to Copy Hyperlink Text (Not the URL)
Sometimes you want to copy the visible text of a hyperlink (e.g., “Click here�) rather than the underlying URL. To copy the text, simply select the text and press Ctrl + C. But if you want to copy the URL from a single hyperlink, right-click the link and choose Copy Hyperlink (or Edit Hyperlink to see the full address).
Common Problems and Solutions
- Find and Replace doesn’t select anything: Make sure “Use wildcards� is checked and you typed the exact syntax. The space after HYPERLINK is important.
- Macros are disabled: If the macro doesn’t run, go to File > Options > Trust Center > Trust Center Settings > Macro Settings and enable “Disable all macros with notification� or “Enable all macros� temporarily.
- Links are in text boxes or headers: The Find and Replace method works on the main body only. For headers/footers, you need to repeat the process in each section.
- You see field codes instead of links: Press Alt + F9 to toggle between field codes and results.
Word on Mac: Different Shortcuts
On a Mac, the shortcuts differ slightly. Use Command + H to open Find and Replace, and Command + C to copy. The wildcard syntax is the same. The macro editor is opened with Option + F11 (or via Tools > Macro > Visual Basic Editor).
Alternative: Export to HTML or PDF
Another indirect way is to save the Word document as a filtered HTML page, then open that HTML file in a text editor to see all URLs. This works because hyperlinks are stored as <a href="..."> tags.
- Go to File > Save As.
- Choose Web Page, Filtered as the file type.
- Open the saved .htm file with Notepad or any text editor.
- Search for
href=to find all URLs.
This method is useful if you want to see the URLs in context.
Frequently Asked Questions
How do I copy all hyperlinks from Word to Excel?
Use the Find and Replace method to copy the URLs, then paste them into Excel. Each line will go into a separate cell if you paste as text. Alternatively, use the macro to output the URLs, then copy and paste into Excel.
Why doesn’t the Find and Replace method work in Word Online?
Word Online (the free web version) does not support wildcards or macros. You need to use the desktop version of Word to extract hyperlinks this way. In Word Online, you can only copy links one by one.
Can I extract hyperlinks from a PDF instead?
Yes, but the methods are different. You can use Adobe Acrobat’s export features or online tools. In Word, the methods above are specific to .docx files.
What if I only want to copy the display text of all hyperlinks?
Use the macro but modify it to output hl.TextToDisplay instead of hl.Address. This gives you the visible text, not the URL.
Is there a way to copy hyperlinks from multiple Word documents at once?
Yes, you can write a VBA macro that loops through all open documents or a folder of documents, but that is more advanced. For a one-time task, open each document and run the macro individually.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.