メインコンテンツへスキップ

Word文書からすべてのハイパーリンクを選択してコピーするにはどうすればよいですか?

場合によっては、複数のハイパーリンクが存在する長いドキュメントがあり、このドキュメントから一度にすべてのハイパーリンクをコピーしてから、別のドキュメントに貼り付けるだけで済みます。 それらをXNUMXつずつコピーするのではなく、一度にすべてをすばやくコピーできる方法はありますか?

VBAですべてのハイパーリンクをコピーする

VBAを使用してすべてのハイパーリンクアドレスを抽出します

Kutools for Wordを使用して、すべてのハイパーリンクまたはアドレスのみをクリップボードにコピーします良いアイデア3


矢印青い右バブル VBAですべてのハイパーリンクをコピーする

1.ハイパーリンクをコピーするWord文書を開き、を押します。 Altキー+ F11 を開く MicrosoftVisualベースのアプリケーションウィンドウ.

2。 クリック インセット > モジュール、次のVBAをウィンドウにコピーします。

VBA:すべてのハイパーリンクをコピーします

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。 クリック ラン ボタンをクリックしてVBAコードを実行します。 次に、すべてのハイパーリンクが新しいドキュメントにコピーされます。 新しいドキュメントは後で保存できます。 結果は次のようになります。

注: このVBAは、すべてのハイパーリンクが単語でリンクされている場合にのみ実行できます。ハイパーリンクのある画像がある場合、このVBAコードは機能しません。


矢印青い右バブル VBAに対応するすべてのハイパーリンクを抽出します

1.ハイパーリンクを抽出するWord文書を開き、を押します。 Altキー+ F11 を開く MicrosoftVisualベースのアプリケーションウィンドウ.

2。 クリック インセット > モジュール、次のVBAをウィンドウにコピーします。

VBA:すべてのハイパーリンクアドレスを抽出します

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。 クリック ラン ボタンを押してVBAコードを実行します。 次に、すべてのハイパーリンクアドレスが新しいドキュメントに抽出され、後で保存できます。

注: 抽出ハイパーリンクアドレスが元の順序ではありません。


矢印青い右バブル Kutools for Wordを使用して、すべてのハイパーリンクまたはアドレスのみをクリップボードにコピーします

すべてのハイパーリンクまたはアドレスのみをWord文書からクリップボードに簡単かつ迅速にコピーする場合は、 ハイパーリンクをコピーする の有用性 Kutools for Word あなたにこの恩恵を与えることができます。

Kutools for Word, 以上で  便利な機能で、仕事が楽になります。 

インストールした後 Kutools for Word、以下のようにしてください:(今すぐWord用のKutoolsを無料でダウンロードしてください!)

1。 クリック クツールズプラス > ハイパーリンクをコピーする.
ドキュメントコピーハイパーリンク1

2.ポップダイアログで、必要に応じてXNUMXつのオプションを選択します。
ドキュメントコピーハイパーリンク2

次に、ハイパーリンクを配置する場所をXNUMXつ選択し、を押します。 Ctrlキー+ V 貼り付けます。

ハイパーリンクをコピーして貼り付ける
ドキュメントコピーハイパーリンク3
ハイパーリンクアドレスをコピーして貼り付ける
ドキュメントコピーハイパーリンク4

Firefox、Chrome、Internet Explore10などの複数のWordドキュメント/ Excelワークブックのタブブラウジングと編集!

Firefox / Chrome / IEで複数のウェブページを表示し、対応するタブをクリックしてそれらを簡単に切り替えることはおなじみかもしれません。 ここで、Officeタブは同様の処理をサポートしており、XNUMXつのWordウィンドウまたはExcelウィンドウで複数のWordドキュメントまたはExcelワークブックを参照し、タブをクリックすることでそれらを簡単に切り替えることができます。
Officeタブの無料トライアルをクリックしてください!

FirefoxとしてXNUMXつのウィンドウで複数のWord文書を閲覧する

関連記事:

最高のオフィス生産性向上ツール

Kutools for Word - Over で単語体験を向上させましょう 100 注目すべき機能!

🤖 Kutools AI アシスタント: AI であなたの文章を変革します - コンテンツを生成する  /  テキストを書き換える  /  文書を要約する  /  情報のお問い合わせ 文書に基づいて、すべて Word 内で

📘 ドキュメントマスタリー: 分割ページ  /  ドキュメントをマージする  /  選択内容をさまざまな形式でエクスポート (PDF/TXT/DOC/HTML...)  /  PDFへの一括変換  /  ページを画像としてエクスポート  /  複数のファイルを一度に印刷する...

コンテンツ編集: バッチ検索と置換 複数のファイルにわたる  /  すべての画像のサイズを変更する  /  テーブルの行と列を転置する  /  表をテキストに変換...

🧹 楽にお掃除:振り払って 余分なスペース  /  セクションブレーク  /  すべてのヘッダー  /  テキストボックス  /  ハイパーリンク  / その​​他の取り外しツールについては、当社の Web サイトをご覧ください。 グループを削除...

クリエイティブインサート:挿入 千の区切り文字  /  チェックボックス  /  ラジオボタン  /  QRコード  /  バーコード  /  斜線テーブル  /  方程式のキャプション  /  画像キャプション  /  テーブルキャプション  /  複数の写真  / 詳細については、 グループを挿入...

🔍 正確な選択: ピンポイント 特定のページ  /  テーブル  /  シェイプ  /  見出し段落  / ナビゲーションを強化する 他には? 機能の選択...

スターの強化: あらゆる場所に素早く移動  /  繰り返しのテキストを自動挿入  /  ドキュメントウィンドウをシームレスに切り替える  /  11 変換ツール...

👉 これらの機能を試してみませんか? Kutools for Wordは、 60日無料トライアル、制限なし! 🚀
 
Comments (16)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Good information! It assisted me in extracting links from an html file I had opened in Word. Refer to <a href="https://cookieclicker2.io">cookie clicker</a> is idea new.
This comment was minimized by the moderator on the site
How can we export word file hyperlinks and it's Text display to an excel file ? 
This comment was minimized by the moderator on the site
Impresionante! Millón de gracias.Me has acercado a la solución muchísimo pero si fuera posible copiarlos en la fila 1 de un excel ya creado sería impresionante. Es para aplicarles una formula que separa los links del texto.Un saludo y un millón de gracias!!!

This comment was minimized by the moderator on the site
Thank you so much! This was exactly what I was looking for!
This comment was minimized by the moderator on the site
I am amazed. That's gold. You saved me a ton of work.
This comment was minimized by the moderator on the site
Height of Legendary, thanks a million
This comment was minimized by the moderator on the site
Can I get the same script to run in outlook?
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
Excellent! It helped me extract some links from an html file that I opened with Word (Excel was discarding some links). Here is the modified code so that a csv file could be built that could be further used. [quote]SubGetAllHyperlinks() ' Updateby20160504 ' https://www.extendoffice.com/documents/word/1411-word-select-copy-all-hyperlinks.html+&cd=1&hl=en&ct=clnk&gl=us<br /> 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.InsertAfter (oLink.TextToDisplay) rng.InsertAfter (", ") rng.InsertAfter (oLink.Address) rng.InsertAfter (vbCrLf) Next docNew.Activate Application.ScreenUpdating = True Application.ScreenRefresh End Sub[/quote]
This comment was minimized by the moderator on the site
This code works fine to me. The two on examples in the article description don't. Thanks a lot and my best regards.
This comment was minimized by the moderator on the site
Thank you very much for this script. This helped me to extract 5K links. Thank you very much.
This comment was minimized by the moderator on the site
Thank you. Just what I needed to parse a document.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations