Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

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

In some cases, you have a long document with multiple hyperlinks existing in, and you only need to copy all the hyperlinks at once from this document and then paste them to another one. Is there any way can quickly copy all of them at once instead of copying them one by one?

Copy all hyperlinks with VBA

Extract all hyperlinks addresses with VBA

Copy all hyperlinks or only addresses to clipboard with Kutools for Wordgood idea3

Kutools for Word: Add 100 New Advanced Features to Word 2003 / 2007 / 2010 / 2013 / 2016 / 2019.
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10.
Classic Menu for Office: Bring Old Look of Office 2003 Back to Office 2007, 2010, 2013, 2016 and 2019.

arrow blue right bubble Copy all hyperlinks with VBA

1. Open the Word document which you want to copy the hyperlinks, and press Alt + F11 to open the Microsoft Visual Based Application Window.

2. Click Insert > Module, and copy the following VBA into the Window.

VBA: Copy all hyperlinks

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 to run the VBA code. Then all the hyperlinks are copied to a new document. You can save the new document later. You can see the result as follows.

Note: This VBA only can run when all the hyperlinks are linked with word, if there are pictures with hyperlinks, this VBA code cannot work.


arrow blue right bubble Extract all hyperlinks addressesith VBA

1. Open the Word document which you want to extract the hyperlinks, and press Alt + F11 to open the Microsoft Visual Based Application Window.

2. Click Insert > Module, and copy the following VBA into the Window.

VBA: Extract all hyperlinks addresses

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 the Run button to run the VBA code. Then all the hyperlinks addresses are extracted in a new document, you can save it later.

Note: The extract hyperlinks address are not in the original order.


arrow blue right bubble Copy all hyperlinks or only addresses to clipboard with Kutools for Word

If you want to copy all hyperlinks or only addresses to clipboard from Word document easily and quickly, the Copy Hyperlink utility of Kutools for Word can do you this favor.

Kutools for Word, with more than 100 handy functions, makes your jobs easier. 
Go to Download
Free Trial 45 days

After installing Kutools for Word, please do as below:(Free Download Kutools for Word Now!)

1. Click Kutools Plus > Copy Hyperlink.
doc copy hyperlinks 1

2. In the popping dialog, choose one option as you need.
doc copy hyperlinks 2

Now, select one location you want to place the hyperlinks, press Ctrl + V to paste them.

Copy and paste hyperlinks
doc copy hyperlinks 3
Copy and paste hyperlink address
doc copy hyperlinks 4

Tabbed browsing & editing multiple Word documents/Excel workbooks as Firefox, Chrome, Internet Explore 10!

You may be familiar to view multiple webpages in Firefox/Chrome/IE, and switch between them by clicking corresponding tabs easily. Here, Office Tab supports similar processing, which allow you to browse multiple Word documents or Excel workbooks in one Word window or Excel window, and easily switch between them by clicking their tabs.
Click for free trial of Office Tab!

Browse multiple word documents in one window as Firefox

Relative Articles:


Kutools for Word

More than 100 Advanced Functions for Word 2003, 2007, 2010, 2013, 2016 and 2019

shot-kutools-700-225-kte

More Features  |  Free Download  |  Only $39.00 for hundreds of functions

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Fabian · 7 months ago
    Thank you so much! This was exactly what I was looking for!
  • To post as a guest, your comment is unpublished.
    Adrine Bio · 1 years ago
    I am amazed. That's gold. You saved me a ton of work.
  • To post as a guest, your comment is unpublished.
    manny kuyr · 1 years ago
    [b]Height of Legendary, thanks a million[/b]
  • To post as a guest, your comment is unpublished.
    Shadab · 2 years ago
    Can I get the same script to run in outlook?
  • To post as a guest, your comment is unpublished.
    Tony Macelli · 2 years ago
    This is great stuff! Many thanks.
    What changes do I need to make to GetAllHyperlinks() for the following case?

    -- original document contains both normal text and links
    -- result wanted: same document but each link is followed by a space and the URL

    Thanks