Skip to main content

Conas gach hipearnasc a roghnú agus a chóipeáil ó a Word doiciméad?

I roinnt cásanna, tá doiciméad fada agat ina bhfuil iliomad hipearnasc ann, agus ní gá duit ach na hipearnasc go léir a chóipeáil ón doiciméad seo ag an am céanna agus ansin iad a ghreamú go ceann eile. An bhfuil aon bhealach ann ar féidir iad go léir a chóipeáil go tapa ag an am céanna seachas iad a chóipeáil ceann ar cheann?

Cóipeáil gach hipearnasc le VBA

Sliocht gach seoladh hipearnasc le VBA

Cóipeáil gach hipearnasc nó gan ach seoltaí chuig an ngearrthaisce Kutools for Wordsmaoineamh maith3


mboilgeog cheart gorm saighead Cóipeáil gach hipearnasc le VBA

1. oscail an Word doiciméad ar mhaith leat na hipearnasc a chóipeáil, agus brúigh Alt + F11 a oscailt Fuinneog Feidhmchlár Amharcbhunaithe Microsoft.

2. cliceáil Ionsáigh > Modúil, agus cóipeáil an VBA seo a leanas isteach san Fhuinneog.

VBA: Cóipeáil gach hipearnasc

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. Cliceáil ar an Rith cnaipe chun an cód VBA a rith. Ansin cóipeáiltear na hipearnasc go léir chuig doiciméad nua. Féadfaidh tú an doiciméad nua a shábháil níos déanaí. Is féidir leat an toradh a fheiceáil mar seo a leanas.

Nóta: Ní féidir leis an VBA seo rith ach amháin nuair a bhíonn na hipearnasc go léir nasctha leis word, má tá pictiúir le hipearnasc, ní féidir leis an gcód VBA seo oibriú.


mboilgeog cheart gorm saighead Sliocht gach hipearnasc seoltaí VBA

1. oscail an Word doiciméad a bhfuil tú ag iarraidh na hipearnasc a bhaint astu, agus brúigh Alt + F11 a oscailt Fuinneog Feidhmchlár Amharcbhunaithe Microsoft.

2. cliceáil Ionsáigh > Modúil, agus cóipeáil an VBA seo a leanas isteach san Fhuinneog.

VBA: Sliocht gach seoladh hipearnasc

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. Cliceáil ar an Rith cnaipe chun an cód VBA a rith. Ansin baintear na seoltaí hipearnasc go léir i ndoiciméad nua, is féidir leat iad a shábháil níos déanaí.

Nóta: Níl seoladh na hipearnasc sliocht san ord bunaidh.


mboilgeog cheart gorm saighead Cóipeáil gach hipearnasc nó gan ach seoltaí chuig an ngearrthaisce Kutools for Word

Más mian leat gach hipearnasc nó seoladh amháin chuig an ngearrthaisce a chóipeáil uaidh Word doiciméad go héasca agus go tapa, an Cóipeáil Hyperlink fóntais de Kutools for Word an féidir leat an fabhar seo a dhéanamh.

Kutools for Word, le níos mó ná  feidhmeanna úsáideacha, déanann sé do phoist níos éasca. 

Tar éis a shuiteáil Kutools for Word, déan mar atá thíos le do thoil:( Íoslódáil saor in aisce Kutools for Word Anois!)

1. cliceáil Kutools Níos mó > Cóipeáil Hyperlink.
hipearnasc cóip doc 1

2. Sa dialóg popping, roghnaigh rogha amháin de réir mar is gá duit.
hipearnasc cóip doc 2

Anois, roghnaigh suíomh amháin ar mhaith leat na hipearnasc a chur ann, brúigh Ctrl + V chun iad a ghreamú.

Cóipeáil agus greamaigh hipearnasc
hipearnasc cóip doc 3
Cóipeáil agus greamaigh seoladh hipearnasc
hipearnasc cóip doc 4

Brabhsáil tabbed & eagarthóireacht iolrach Word doiciméid/Excel leabhair oibre mar Firefox, Chrome, Internet Explore 10!

Seans go bhfuil tú eolach féachaint ar leathanaigh ghréasáin iolracha i Firefox/Chrome/IE, agus aistriú eatarthu trí chliceáil ar na cluaisíní comhfhreagracha go héasca. Anseo, Office Tab Tacaíonn próiseáil den chineál céanna, a ligeann duit brabhsáil iolrach Word doiciméid nó Excel leabhair oibre i gceann Word fuinneog nó Excel fhuinneog, agus go héasca aistrigh eatarthu trí chliceáil ar a gcuid cluaisíní.
Cliceáil le haghaidh trialach saor in aisce Office Tab!

Brabhsáil iolrach word doiciméid i bhfuinneog amháin mar Firefox

Ailt Choibhneasta:


molta Word Uirlisí Táirgiúlachta

 

Kutools For Word - Níos mó ná 100 Ardghnéithe Do Word, Sábháil Do Am 50%.

  • Is féidir oibríochtaí casta agus arís agus arís eile a dhéanamh próiseáil aon-uaire i soicindí.
  • Cuir isteach íomhánna iolracha trasna fillteáin isteach Word doiciméad láithreach.
  • Cumaisc agus cuir le chéile iolrach Word comhaid trasna fillteáin isteach i gceann le d'ordú inmhianaithe.
  • Roinn an doiciméad reatha i ndoiciméid ar leithligh de réir ceannteidil, briseadh ailt nó critéir eile.
  • Tiontaigh comhaid idir Doc agus Docx, Docx agus PDF, bailiú uirlisí le haghaidh comhshó agus roghnú coitianta, agus mar sin de ...
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.
This comment was minimized by the moderator on the site
Indeed! ONE year later, am having similar issues and totally bawled over by your wonderful help!! God Bless YOu!!
This comment was minimized by the moderator on the site
it is prompting " Compile Error: Syntax Error" Please help me, I need to do a lot of work using this .Reply asap
This comment was minimized by the moderator on the site
wow, its great. Thank you so much
This comment was minimized by the moderator on the site
Omg this is legendary stuff. So helpful. Thanks a lot! :-)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations