Je vous serais reconnaissant si quelqu'un pouvait m'aider et de préciser ce qui doit être changé dans le code ci-dessous (je l'ai trouvé sur www.extendoffice.com) restreindre à la partie sélectionnée du texte (ne pas travailler tout au long de l'ensemble du document).
Le code est l'extraction des liens hypertexte à partir d'un document word à l'autre.
Sub HyperlinksExtract()
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