KutoolsforOffice — One Suite. Five Tools. Get More Done.

How to select and copy all hyperlinks from a Word document?

AuthorSunLast modified

When working with a lengthy Word document that contains numerous hyperlinks—whether they point to websites, documents, or network locations—you may sometimes need to copy all of these hyperlinks for tasks like auditing, sharing, compiling references, or migrating content. Selecting each hyperlink manually is not only inefficient but can also lead to errors and omitting links. Fortunately, several practical methods allow you to extract and copy all hyperlinks, including either the display text with links or just the hyperlink addresses, saving you significant time. This tutorial explores multiple approaches—using built-in Word features, VBA code, and Kutools for Word—to help you efficiently gather hyperlinks according to your needs.


Copy all hyperlinks to a new document using VBA

If you need to extract both the display text and the link for every hyperlink in a Word document, using VBA code can automatically collate all hyperlinks into a new document, making organization and sharing much simpler. This solution is best when you need a formatted record of all hyperlinks or want to easily review the context alongside the actual links. It is especially helpful if your document contains hundreds of hyperlinks within body text or tables.

  1. Open the Word document that contains the hyperlinks. Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  2. In the VBA window, click Insert > Module. 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
    
  3. Click the Run button or press F5 to execute the VBA code. The code will automatically generate a new Word document containing all the hyperlinks from the original document. You can then save or further edit this new document as needed.
    Document with text with hyperlinks>>>New document with only text with hyperlinks

Note: This VBA approach only extracts text-based hyperlinks. Hyperlinks embedded in images, shapes, or objects will not be included. For best results, review your document to confirm hyperlinks reside within text or tables.


Extract only hyperlink addresses (plain text) to a new document using VBA

In situations where you only need the hyperlink URLs (addresses) without any display text or formatting—for example, when building a reference list or for data migration—a different VBA method can extract just the addresses and paste them into a new document as plain text. This is ideal for cataloging or exporting hyperlinks for technical tasks, audits, or integration into web or database systems.

  1. Open your Word document and press Alt + F11 to open the VBA editor.
  2. Click Insert > Module. Copy and paste the following VBA code into the module:
    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
    
  3. Click Run or press F5. The VBA script will scan your document and output a new document with all link addresses listed as plain text. This new document is easy to copy, export, or use in other software.
    Document with text with hyperlinks>>>New document with only hyperlink addresses

Note: The order of addresses in the output document may not exactly match the sequence in the original document, especially for hyperlinks within tables or grouped elements. Always verify the results if your project relies on strict ordering.


Copy hyperlinks or addresses to clipboard using Kutools for Word

Kutools for Word offers an intuitive feature to instantly copy all hyperlinks or just addresses to the clipboard, streamlining what would otherwise be a multi-step or code-based process. This method is particularly useful if you need to quickly integrate links into emails, web pages, or spreadsheets, and is suitable for all user levels.

Kutools for Word

Kutools for Word helps you handle everyday document tasks faster with practical tools built right into Microsoft Word—no coding, no complex setup.

  • AI writing, polishing, translation, and summarization
  • Batch find and replace across documents
  • Merge and split Word documents easily
  • Batch Word ↔ PDF conversion
  1. Navigate to the Kutools Plus tab in the Word ribbon, then click Copy Hyperlink.
    Copy Hyperlink button on the Kutools tab on the ribbon
  2. Within the Copy all hyperlinks to clipboard dialog box, choose whether you wish to copy hyperlinks with their display text (the visible words linked in your document) or just the hyperlink addresses (the URLs).
    Copy all hyperlinks to clipboard dialog box
  3. The chosen hyperlinks or addresses will be copied to your clipboard. You can now paste them anywhere—such as in a new document, email, or browser—by pressing Ctrl + V.
  • Selecting the Hyperlinks option will copy both the display text and the clickable links together, so when pasted, links remain functional.
    Text with hyperlinks pasted
  • Choosing the Hyperlink Addresses option will copy only the raw URL addresses as plain text, which is ideal for technical use.
    Hyperlinks addresses pasted

Want a faster way to handle similar tasks in Word? Try Kutools for Word and simplify your daily work.



Demo: Copy All Hyperlinks in a Word Document

 

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!

Try Office Tab for free now!


Related Articles:

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 Word tabs on the ribbon
 
 

Office Tab - Brings Tabbed interface to Office, Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Free Download     Buy Now     Learn More
 

✨ 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