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 71,1% France
Canada 5,1% Canada
Chine 4,8% Chine

Total:

162

Pays
018491179
Aujourd'hui: 355
Hier: 264
Cette semaine: 355
Semaine dernière: 2.421
Ce mois: 5.951