IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Word Discussion :

Connaître quels mots reviennent le plus souvent dans un même document Word (2003) [Sources]


Sujet :

Word

  1. #1
    Membre éprouvé
    Avatar de beegees
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2004
    Messages
    3 610
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Enseignement

    Informations forums :
    Inscription : Mars 2004
    Messages : 3 610
    Points : 1 277
    Points
    1 277
    Par défaut Connaître quels mots reviennent le plus souvent dans un même document Word (2003)
    Bonjour tout le monde,

    J'ai plusieurs document Word qui font tous plus de 30 pages.

    J'aimerais connaitre les mots qui sont les plus présent.

    Je présume que l'on doit passer par du VBA pour cela ?

    J'ai vu que Word 2003 avait un outil de statistique mais il me donne le nombre de mot.... ce qui n'est pas assez.

    Merci d'avance pour votre aide.

    beegees

  2. #2
    Rédacteur/Modérateur

    Avatar de Heureux-oli
    Homme Profil pro
    Contrôleur d'industrie
    Inscrit en
    Février 2006
    Messages
    21 087
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 59
    Localisation : Belgique

    Informations professionnelles :
    Activité : Contrôleur d'industrie
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Février 2006
    Messages : 21 087
    Points : 42 926
    Points
    42 926
    Par défaut
    C'est une opération qui va être très lourde.

    Le principe, pour chaque mot du document, répertorier ce mot.
    Le stocker dans un tableau si il n'existe pas encore. Si ce mot existe, incrémenter la valeur de présence du mot.
    J'ai pas encore de décodeur, alors, postez en clair ! Comment mettre une balise de code ?
    Débutez en VBA

    Mes articles


    Dans un MP, vous pouvez me dire que je suis beau, ... mais si c'est une question technique je ne la lis pas ! Vous êtes prévenus !

  3. #3
    Membre éprouvé
    Avatar de beegees
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2004
    Messages
    3 610
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Enseignement

    Informations forums :
    Inscription : Mars 2004
    Messages : 3 610
    Points : 1 277
    Points
    1 277
    Par défaut
    Citation Envoyé par Heureux-oli Voir le message
    C'est une opération qui va être très lourde.

    Le principe, pour chaque mot du document, répertorier ce mot.
    Le stocker dans un tableau si il n'existe pas encore. Si ce mot existe, incrémenter la valeur de présence du mot.
    Salut,

    Merci pour ta réponse.

    En effet, s'est faisable, ton algorithme devrait m'aider à commencer.

    ça n'existe nulle part ?

    Le but de cette question (j'ai oublié de le préciser) s'est de créer des corrections automatiques pour ces mots qui sont le plus souvent tapés, cela me permettrait d'avoir un petit nombre de constantes qui quand je le taperai sous word se transformerai directement dans le bon mot.

    Exemple :

    CTabClasseGénériquesDesVéhicules (qui est un terme de programmation que j'utilise souvent en word pour mon cours de C++) que j'ai transformé en ct, directement après avoir tapé ct espace, le mot CTabClasseGénériquesDesVéhicules s'inscris.

    J'aurais voulu faire le même pour les mots ou terme qui reviennent très souvent.

    beegees

  4. #4
    Expert éminent
    Avatar de Sepia
    Homme Profil pro
    Administrateur du cursus IDE@L - Chef de Projet NCU (digital learning) - Université de Rennes
    Inscrit en
    Octobre 2007
    Messages
    3 117
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 60
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Administrateur du cursus IDE@L - Chef de Projet NCU (digital learning) - Université de Rennes
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Octobre 2007
    Messages : 3 117
    Points : 6 856
    Points
    6 856
    Par défaut Mots les + souvent rencontrés
    Salut,

    La méthode que te propose Heureux-Oli a le mérite d'être générique et de se baser sur la fréquence des mots mais elle est longue et en terme d'analyse du langage, ce n'est pas forcément la bonne solution. En effet, dans un texte naturel, il existe énormement de mots connecteurs ("et", "le"...) qui n'ont pas/peu d'importance sémantique et qui vont parasiter ton analyse. Et je ne suis pas sûr que la correction de ces mots ("mais", "et"...) apporte grand chose mais je ne connais pas assez ton besoin.

    Si c'est la fréquence brute du mot que tu recherches, Heureux-Oli t'a indiqué la méthode mais sinon il vaut mieux faire une analyse orientée. Pour savoir si c'est le cas, prends un texte (corrigé) et fais ton analyse à la main et stocke ce qui t'interèsse comme "mot à corriger", puis demande à Word de te faire une synthèse automatique ("outils-synthèse automatique"), et refais ton analyse. Si en dehors tes connecteurs, tu as une analyse similaire, c'est que ton besoin porte plus sur la sémantique que sur la fréquence des mots. Mais le problème est alors que ton document pour être analysé doit être "sans faute" (avec correction de tes insertions automatiques donc cà se mord la queue). Mais le principe est de savoir si c'est ou non la bonne analyse. Si tu es dans ce cas, tu devrais alors rechercher plutôt de la manière suivante :
    - Tu te crées une liste de mots indésirables (dont les connecteurs)
    Puis pour chaque document à analyser :
    1. Tu enregistres ton document au format texte (ce qui vire, d'un seul coup, toutes images, les marques de césure automatique, les trucs spéciaux de Word...) sous un autre nom (pour ne pas perdre l'original)
    2. Tu fermes ton fichier d'origine (le fichier Word) et tu réouvres le fichier texte avec Word
    3. Tu effectues un remplacement global de toutes les marques de paragraphe "^p" par un espace simple " "
    4. Tu effectues un remplacement global de tous les espacements "^w" par un espace simple " "
    5. Tu supprimes tous les mots de ta liste des mots indésirables de ton document (par un simple remplacer <mot_indésirable> par "" global sur tout ton document)
    6. Tu effectues un remplacement global de tous les espaces " " par un caractère spécial que tu n'utilises pas du style "§" (c'est l'optimisation)
    7. Tu sélectionnes tout ton texte (qui ne devrait avoir ici qu’un seul paragraphe) et tu convertis ton texte en tableau en précisant une seule colonne et "§" dans "Autres" dans la zone "Séparer le texte au niveau des..." ==> Ton texte est alors dans un tableau d'une seule colonne qui contient une ligne par mot (dans l'ordre de ton document hormis les mots indésirables)
    8. Tu effectues alors une simple commande "Tableau-Trier" sur la 1ere colonne (mais tu n'en n'as qu'une ici si tu as tout bien suivi) ==> Et maintenant ton document a les mots triés dans l'ordre alphabétique
    9. Tu peux alors les regrouper par nombre d'occurrence par un simple parcours



    Cette méthode fonctionne aussi si tu veux compter tous les mots mais celle de Heureux-Oli est plus simple (un seul code) mais l'intérêt de cette méthode est multiple :
    • tu n'as pas à travailler sur des mots indésirables (comme CTabClasseGénériquesDesVéhicules)
    • Tu peux avoir plusieurs listes de mots en fonction de ton besoin voire en cascade (c'est un principe similaire à celui des feuilles de styles pour le XML)
    • Tu peux sauvegarder à tout moment ton traitement pour retirer des mots (ou des lignes du tableau) et le reprendre après



    Tiens-nous au courant

  5. #5
    Membre chevronné

    Profil pro
    Inscrit en
    Avril 2006
    Messages
    1 399
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2006
    Messages : 1 399
    Points : 2 221
    Points
    2 221
    Par défaut
    bonjour,

    une solution possible en vba :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
     
    Public Function StatsMots()
       Dim oIdx As Collection
       Dim i As Long, lCountMots As Long, lTotal As Long
       Dim aiCounts() As Integer
       Dim sMot As String
       lCountMots = GetStatsMots(oIdx, aiCounts)
    Debug.Print "Compte mots différents :", lCountMots
       'Calcul le total de mots
       For i = 1 To lCountMots
          lTotal = lTotal + aiCounts(i)
       Next i
    Debug.Print "Nombre total calculé de mots :", lTotal
    Debug.Print "Nombre total de mots d'après word :", _
                ActiveDocument.ComputeStatistics(wdStatisticWords, True)
       'Cherche le nombre d'occurences d'un mot
       sMot = "Bonjour"
    Debug.Print "Occurence du mot '" & sMot & "' : " & GetOccurences(sMot, oIdx, aiCounts)
       sMot = "un"
    Debug.Print "Occurence du mot '" & sMot & "' : " & GetOccurences(sMot, oIdx, aiCounts)
       'Reset la collection
       Set oIdx = Nothing
    End Function
     
    'Compte les occurences d'un mot
    Private Function GetOccurences(ByVal sMot As String, ByRef oIdx As Collection, _
                                   ByRef aiCounts() As Integer) As Integer
       On Error Resume Next
       Dim lPos As Long
       lPos = Val(oIdx(Trim$(sMot)))
       If Not Err Then
          GetOccurences = aiCounts(lPos)
       End If
    End Function
     
    'Compute les stats
    Private Function GetStatsMots(ByRef oIdx As Collection, _
                                  ByRef aiCounts() As Integer) As Long
       On Error Resume Next
       Dim vMot As Variant
       Dim sMot As String
       Dim lPos As Long
       Set oIdx = New Collection
       ReDim aiCounts(0 To 0)
       For Each vMot In ActiveDocument.Words
          sMot = RTrim(vMot)
          If Asc(sMot) > 32 Then
             lPos = Val(oIdx(sMot))
             If Err.Number > 0 Then
                Err.Clear
                lPos = UBound(aiCounts) + 1
                ReDim Preserve aiCounts(lPos)
                aiCounts(lPos) = 1
                oIdx.Add lPos & "|" & sMot, sMot
             Else
                aiCounts(lPos) = aiCounts(lPos) + 1
             End If
          End If
       Next vMot
       GetStatsMots = oIdx.Count
    End Function
    cordialement,

    Philippe

  6. #6
    Membre éprouvé
    Avatar de beegees
    Homme Profil pro
    Développeur Web
    Inscrit en
    Mars 2004
    Messages
    3 610
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Enseignement

    Informations forums :
    Inscription : Mars 2004
    Messages : 3 610
    Points : 1 277
    Points
    1 277
    Par défaut
    Bonjour,

    Merci pour ta réponse.

    s'est vraiement pas mal, merci.

    Bon disons que s'est un début, je vais essayer de l'adapté.

    Merci encore.

    beegees

  7. #7
    Membre chevronné

    Profil pro
    Inscrit en
    Avril 2006
    Messages
    1 399
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2006
    Messages : 1 399
    Points : 2 221
    Points
    2 221
    Par défaut
    bonjour,

    j'ai affiné un peu :

    Une classe permettant de gérer les stats de chaque mot :
    - Nb occurences;
    - Distance moyenne entre chaque occurence
    - Dispersion des occurences (ecart type des distances)

    J'ai ajouter une fonction de tri sur la collection qui permet de trier les mots selon (au choix) :
    - un ordre alphabétique inverse des mots
    - un ordre décroissant des occurences
    - un ordre décroissant des distances moyennes
    - un ordre décroissant des ecart types

    La classe à placer dans un module de classe nommé : oStatsMot
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
     
    'Enum pour trier la collection de mots
    Public Enum eStatsMotTri
       eMot = 1
       eNbOccurences
       eMoyenne
       eEcartType
    End Enum
    Private glNbOccurences As Long
    Private gsMot As String
    Private glSumDists As Long
    Private glSumDistsCarre As Long
    Private glLastPos As Long
    Private Sub class_initialize()
       glNbOccurences = 1
    End Sub
    Public Property Set Valeurs(oMot As oStatsMot)
       glNbOccurences = oMot.NbOccurences
       gsMot = oMot.Mot
       glSumDists = oMot.SommeDistances
       glSumDistsCarre = oMot.SommeDistancesCarre
       glLastPos = oMot.LastPosition
    End Property
    Public Sub SetMot(ByVal Mot As String, ByVal lPos As Long)
       gsMot = Mot
       glLastPos = lPos
    End Sub
    Public Property Let incCompte(ByVal lPos As Long)
       Dim lDist As Long
       glNbOccurences = glNbOccurences + 1
       lDist = lPos - glLastPos - 1
       glSumDists = glSumDists + lDist
       glSumDistsCarre = glSumDistsCarre + (lDist ^ 2)
       glLastPos = lPos
    End Property
    Public Property Get Mot() As String
       Mot = gsMot
    End Property
    Public Property Get NbOccurences() As Long
       NbOccurences = glNbOccurences
    End Property
    Public Property Get DistanceMoyenne() As Long
       If glNbOccurences > 1 Then DistanceMoyenne = glSumDists \ (glNbOccurences - 1)
    End Property
    Public Property Get EcartTypeDistance() As Single
       Dim fDiffSomme As Single
       If glNbOccurences > 2 Then
          fDiffSomme = CSng(glSumDistsCarre) / (glNbOccurences - 1) - DistanceMoyenne ^ 2
          If fDiffSomme > 0 Then EcartTypeDistance = Sqr(fDiffSomme)
       End If
    End Property
    Public Property Get Valeur(eType As eStatsMotTri) As Variant
       Select Case eType
       Case eStatsMotTri.eMot
          Valeur = gsMot
       Case eStatsMotTri.eNbOccurences
          Valeur = glNbOccurences
       Case eStatsMotTri.eMoyenne
          Valeur = DistanceMoyenne
       Case eStatsMotTri.eEcartType
          Valeur = DistanceMoyenne
       End Select
    End Property
    'Friend property
    Friend Property Get SommeDistances() As Long
       SommeDistances = glSumDists
    End Property
    Friend Property Get SommeDistancesCarre() As Long
       SommeDistancesCarre = glSumDistsCarre
    End Property
    Friend Property Get LastPosition() As Long
       LastPosition = glLastPos
    End Property
    Dans un module standard placer les fonctions suivantes :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
     
    'Compute les stats
    Public Function GetStatsMots(ByRef oMots As Collection) As Long
       On Error Resume Next
       Dim oMot As oStatsMot
       Dim vMot As Variant
       Dim sMot As String
       Dim lPos As Long
       Set oMots = New Collection
       For Each vMot In ActiveDocument.Words
          sMot = RTrim(vMot)
          If Asc(sMot) > 32 Then
             lPos = lPos + 1
             Set oMot = oMots(sMot)
             If Err.Number > 0 Then
                Err.Clear
                Set oMot = New oStatsMot
                oMot.SetMot sMot, lPos
                oMots.Add oMot, sMot
             Else
                oMot.incCompte = lPos
             End If
          End If
       Next vMot
       GetStatsMots = oMots.Count
       Set oMot = Nothing
    End Function
    'Compte les occurences d'un mot
    Public Function GetOccurences(ByVal sMot As String, ByRef oMots As Collection) As Long
       On Error Resume Next
       Dim oMot As oStatsMot
       Set oMot = oMots(Trim$(sMot))
       If Not Err Then
          GetOccurences = oMot.NbOccurences
       End If
       Set oMot = Nothing
    End Function
    'Retourne le max d'occurences pour un mot
    Public Function GetMaxOccurences(ByRef oMots As Collection) As Long
       Dim oMot As oStatsMot
       For Each oMot In oMots
          If oMot.NbOccurences > GetMaxOccurences Then GetMaxOccurences = oMot.NbOccurences
       Next oMot
       Set oMot = Nothing
    End Function
    'Retourne le mot ayant le max d'occurences
    Public Function GetMotMaxOccurences(ByRef oMots As Collection) As String
       Dim oMot As oStatsMot
       Dim lMax As Long
       For Each oMot In oMots
          If oMot.NbOccurences > lMax Then
             GetMotMaxOccurences = oMot.Mot
             lMax = oMot.NbOccurences
          End If
       Next oMot
       Set oMot = Nothing
    End Function
    'Retourne la distance moyenne maxi d'occurences
    Public Function GetMaxDistance(ByRef oMots As Collection) As Long
       Dim oMot As oStatsMot
       For Each oMot In oMots
          If oMot.DistanceMoyenne > GetMaxDistance Then _
             GetMaxDistance = oMot.DistanceMoyenne
       Next oMot
       Set oMot = Nothing
    End Function
    'Retourne le mot ayant la distance moyenne maxi d'occurences
    Public Function GetMotMaxDistance(ByRef oMots As Collection) As String
       Dim oMot As oStatsMot
       Dim lMax As Long
       For Each oMot In oMots
          If oMot.DistanceMoyenne > lMax Then
             GetMotMaxDistance = oMot.Mot
             lMax = oMot.DistanceMoyenne
          End If
       Next oMot
       Set oMot = Nothing
    End Function
    'Tri la collection selon le type de choisi (voir classe oStatsMot
    Public Sub TriCollMots(ByRef oMots As Collection, ByVal eType As eStatsMotTri)
       Dim i As Long, j As Long, lInc As Long, n As Long, lMin As Long
       Dim oSaveMot As oStatsMot
       Dim vRef As Variant
       n = oMots.Count
       lInc = 1
       While lInc < n
          lInc = lInc * 3 + 1
       Wend
       While lInc > 1
          lInc = lInc / 3
          lMin = lInc + 1
          For i = lMin To n
             j = i
             Set oSaveMot = New oStatsMot
             Set oSaveMot.Valeurs = oMots(j)
             vRef = oSaveMot.Valeur(eType)
             Do While vRef > oMots(j - lInc).Valeur(eType)
                Set oMots(j).Valeurs = oMots(j - lInc)
                j = j - lInc
                If j < lMin Then Exit Do
             Loop
             Set oMots(j).Valeurs = oSaveMot
          Next i
       Wend
       Set oSaveMot = Nothing
    End Sub
    Dans <ThisDocument> placer la fonction principale de test :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
     
    Public Function StatsMots()
       On Error GoTo errtag
       Dim oMots As Collection
       Dim oMot As oStatsMot
       Dim i As Long, lCountMots As Long
       Dim sMot As String
       lCountMots = GetStatsMots(oMots)
    Debug.Print "Nombre de mots différents:" & lCountMots
       'Affiche les 5 premiers
    Debug.Print vbCrLf & "- LES 5 MOTS AYANT LE PLUS D'OCCURENCES -"
       'Tri décroissant selon le nombre d'occurences
       TriCollMots oMots, eNbOccurences
       i = 1
       For Each oMot In oMots
    Debug.Print "Mot:" & oMot.Mot, "NbOccurences:" & oMot.NbOccurences, _
                "Dist Moy:" & oMot.DistanceMoyenne, "EC:" & oMot.EcartTypeDistance
          If i >= 5 Then Exit For
          i = i + 1
       Next oMot
     
       'Affiche les 5 derniers
    Debug.Print vbCrLf & "- LES 5 PREMIERS MOTS TRIES PAR ORDRE ALPHABETIQUE -"
       'Tri décroissant selon un ordre alpahbetique inverse
       TriCollMots oMots, eMot
       For i = oMots.Count To oMots.Count - 5 Step -1
    Debug.Print "Mot:" & oMots(i).Mot, "NbOccurences:" & oMots(i).NbOccurences, _
                "Dist Moy:" & oMots(i).DistanceMoyenne, "EC:" & oMots(i).EcartTypeDistance
       Next i
    Debug.Print vbCrLf & "- DIVERS STATISTIQUES -"
    Debug.Print "Max occurences:" & GetMaxOccurences(oMots), "Mot:" & GetMotMaxOccurences(oMots)
    Debug.Print "Max distance:" & GetMaxDistance(oMots), "Mot:" & GetMotMaxDistance(oMots)
    Debug.Print vbCrLf & "- STATISTIQUES POUR UN MOT -"
       sMot = "bonjour"
    Debug.Print "Mot:" & sMot, "Nb occurences:" & GetOccurences(sMot, oMots)
    fin:
       Set oMot = Nothing
       'Reset la collection et les objets
       Set oMots = Nothing
       Exit Function
    errtag:
       MsgBox "Erreur n°" & Err.Number & vbCrLf & "Description:" & Err.Description, _
              vbExclamation, "StatsMot"
       Resume fin
    End Function
    Utilisation :
    ----------
    Placer le curseur dans la fonction principale puis appuyer sur <F5> pour lancer les calculs

    Les résultats apparaissent dans la zone <Exécution> de VBE

    Améliorations possibles :
    -----------------------
    • Les fonctions dans le module standard peuvent être transformées en une classe
    • Ajout de stats supplémentaires (pourcentile, etc...)
    • Meilleur filtre des faux-mots (parenthèse, :, ;, etc...)

    Bonne continuation,

    Philippe

  8. #8
    Candidat au Club
    Homme Profil pro
    Intégrateur Web
    Inscrit en
    Mars 2018
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Canada

    Informations professionnelles :
    Activité : Intégrateur Web
    Secteur : Conseil

    Informations forums :
    Inscription : Mars 2018
    Messages : 2
    Points : 3
    Points
    3
    Par défaut Liste de mots connecteurs
    Bonjour,

    Si ça peut aider, voici le script que j'ai fait afin de supprimer les mots connecteurs.

    Merci beaucoup à philben pour les trois scripts, c'est exactement ce que je cherchais depuis des années! J'ai passé deux heures à entrer des mots connecteurs et je la partage ici en reconnaissance pour les scripts.

    Un gros gros merci! (Et si vous avez des conseils pour optimiser mon script je suis prenant! )

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    646
    647
    648
    649
    650
    651
    652
    653
    654
    655
    656
    657
    658
    659
    660
    661
    662
    663
    664
    665
    666
    667
    668
    669
    670
    671
    672
    673
    674
    675
    676
    677
    678
    679
    680
    681
    682
    683
    684
    685
    686
    687
    688
    689
    690
    691
    692
    693
    694
    695
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    707
    708
    709
    710
    711
    712
    713
    714
    715
    716
    717
    718
    719
    720
    721
    722
    723
    724
    725
    726
    727
    728
    729
    730
    731
    732
    733
    734
    735
    736
    737
    738
    739
    740
    741
    742
    743
    744
    745
    746
    747
    748
    749
    750
    751
    752
    753
    754
    755
    756
    757
    758
    759
    760
    761
    762
    763
    764
    765
    766
    767
    768
    769
    770
    771
    772
    773
    774
    775
    776
    777
    778
    779
    780
    781
    782
    783
    784
    785
    786
    787
    788
    789
    790
    791
    792
    793
    794
    795
    796
    797
    798
    799
    800
    801
    802
    803
    804
    805
    806
    807
    808
    809
    810
    811
    812
    813
    814
    815
    816
    817
    818
    819
    820
    821
    822
    823
    824
    825
    826
    827
    828
    829
    830
    831
    832
    833
    834
    835
    836
    837
    838
    839
    840
    841
    842
    843
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
    855
    856
    857
    858
    859
    860
    861
    862
    863
    864
    865
    866
    867
    868
    869
    870
    871
    872
    873
    874
    875
    876
    877
    878
    879
    880
    881
    882
    883
    884
    885
    886
    887
    888
    889
    890
    891
    892
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    904
    905
    906
    907
    908
    909
    910
    911
    912
    913
    914
    915
    916
    917
    918
    919
    920
    921
    922
    923
    924
    925
    926
    927
    928
    929
    930
    931
    932
    933
    934
    935
    936
    937
    938
    939
    940
    941
    942
    943
    944
    945
    946
    947
    948
    949
    950
    951
    952
    953
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    965
    966
    967
    968
    969
    970
    971
    972
    973
    974
    975
    976
    977
    978
    979
    980
    981
    982
    983
    984
    985
    986
    987
    988
    989
    990
    991
    992
    993
    994
    995
    996
    997
    998
    999
    1000
    1001
    1002
    1003
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    1015
    1016
    1017
    1018
    1019
    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    Sub RemplacerConnecteurs3()
    '
    ' RemplacerConnecteurs3 Macro
    '
    '
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "la"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "le"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "les"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "ces"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "ce"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "mais"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "ou"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "et"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "donc"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "car"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "ni"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "or"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "l'"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
    	Selection.Find.Execute Replace:=wdReplaceAll
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "d'"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "du"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "celle"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "celui"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "de"
            .Replacement.Text = " "
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = ","
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "."
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "à"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "que"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "des"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "dans"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "nous"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "est"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "en"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "("
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = ")"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "-"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "qui"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "pas"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "il"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "je"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "tu"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "elle"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "on"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "nous"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "vous"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "ils"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "elles"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "eux"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "une"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "un"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "ne"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "pour"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "se"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "»"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "au"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "son"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "qu'"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "par"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "plus"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "sur"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "d'"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "«"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "notre"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "votre"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "leur"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "leurs"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "c'"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "si"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "s'"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "a"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "cette"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "ça"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "cela"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    	Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = "comme"
            .Replacement.Text = ""
            .Forward = True
            .Wrap = wdFindContinue
            .Format = False
            .MatchCase = False
            .MatchWholeWord = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    End Sub

Discussions similaires

  1. Réponses: 3
    Dernier message: 10/04/2012, 12h06
  2. Réponses: 1
    Dernier message: 22/11/2011, 09h37
  3. [WD-2007] deux en-tête dans un même document word
    Par samworkflow dans le forum Word
    Réponses: 3
    Dernier message: 21/07/2009, 09h24
  4. Elément le plus souvent dans un tableau
    Par direct dans le forum Algorithmes et structures de données
    Réponses: 8
    Dernier message: 25/11/2008, 00h06
  5. [Choix] Quel framework est le plus indiqué dans mon cas ?
    Par ptr83 dans le forum Frameworks Web
    Réponses: 12
    Dernier message: 14/03/2008, 12h10

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo