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 70,6% France
Chine 5,5% Chine
Canada 5,0% Canada

Total:

163

Pays
018501896
Aujourd'hui: 70
Hier: 192
Cette semaine: 70
Semaine dernière: 2.469
Ce mois: 4.911