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 extraire toutes les phrases surlignées et les copier dans un autre document ?

Recherche

Avec une macro :

 

Sub surlignage()
'macro écrite par m@rina
Dim trad As String, Liste As String, ND As Document

Application.ScreenUpdating = False
Selection.HomeKey Unit:=wdStory

'Recherche de tous les mots surlignés
    Do
        Selection.Find.ClearFormatting
        With Selection.Find
        .Highlight = True

            .Execute
        End With

    If Selection.Find.Found Then
        trad = Selection.Text
            If InStr(Liste, trad) = 0 Then
                Liste = Liste & trad & vbCr
            End If
        End If
    Loop Until Not Selection.Find.Found

'On crée le nouveau doc et on y insère les textes trouvés
    Set ND = Documents.Add
    Selection.TypeText Text:=Liste
End Sub

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