Deprecated: RegularLabs\Library\ArrayHelper::implode(): Implicitly marking parameter $last_glue as nullable is deprecated, the explicit nullable type must be used instead in /homepages/10/d550841420/htdocs/libraries/regularlabs/src/ArrayHelper.php on line 225
Comment imprimer un document contenant des liens hypertextes avec les adresses des liens et non leurs titres ?

Recherche

  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

 

Statistiques

France 72,3% France
Canada 5,3% Canada
Chine 3,7% Chine

Total:

154

Pays
018457934
Aujourd'hui: 119
Hier: 236
Cette semaine: 119
Semaine dernière: 2.729
Ce mois: 5.862