user_mobilelogo
  1. Une solution simple : coller le texte dans wordpad (format RTF) puis le recoller depuis wordpad dans word.

    ou bien
  2. Une macro. Si le rose ne convient pas , on peut le changer !

Public Sub AfficherURL()
'Macro écrite par Guy Moncomble
'Ce code peut être simplifié
Dim HyperLien As Field, ResultatRequèteUrl As String
Dim CodeChampUrl As String
Dim TrueURL As String
For Each HyperLien In ActiveDocument.Fields
HyperLien.Select
Selection.Collapse wdCollapseEnd
If HyperLien.Type = wdFieldHyperlink Then
'Texte affiché
ResultatRequèteUrl = HyperLien.Result
CodeChampUrl = HyperLien.Code
'Insérer URL
TrueURL = URLDansChamp(CodeChampUrl)
Selection.InsertAfter Chr(32)
Selection.Collapse wdCollapseEnd
Selection.InsertAfter " ( " & TrueURL & " ) "
Selection.Range.Font.ColorIndex = wdPink
Selection.Collapse wdCollapseEnd
Selection.MoveLeft unit:=wdCharacter, Extend:=wdExtend
Selection.Range.Font.ColorIndex = wdAuto
End If
Next HyperLien
End Sub

Public Function URLDansChamp(ResultatURL As String)
' Macro écrite par Guy Moncomble
Dim Pos1 As Integer, URL As String
'Le texte est du type : HYPERLIEN "URL"
Pos1 = InStr(ResultatURL, Chr(34))
URL = Mid(ResultatURL, Pos1 + 1)
URLDansChamp = Left(URL, Len(URL) - 1)
End Function

 


Voir aussi...

Statistiques

Aujourd'hui1696
Hier1893
Cette semaine8765
Ce mois28058
Total depuis 200418230598

9
visiteurs actuellement en ligne

19 avril 2024