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
| Sub StylesRechercheDes1()
Dim S As Style
Dim msg As String
Dim NomduStyle As Style
For Each S In ActiveDocument.Styles
i = i + 1
Set NomduStyle = ActiveDocument.Styles(i)
With NomduStyle
NomduStyle = .NameLocal
End With
If ActiveDocument.Styles(NomduStyle).InUse = True Then
ok = InStr(LCase(NomduStyle), "**00_gras_car") = 0
ok = ok And InStr(LCase(NomduStyle), "**00_gras_ital_car") = 0
ok = ok And InStr(LCase(NomduStyle), "**00_ital_car") = 0
ok = ok And InStr(LCase(NomduStyle), "**01_m_mme_maitres...") = 0
ok = ok And InStr(LCase(NomduStyle), "**01_nor_reference") = 0
ok = ok And InStr(LCase(NomduStyle), "**01_nor_reference_ital_car") = 0
ok = ok And InStr(LCase(NomduStyle), "**01_rapporteur") = 0
ok = ok And InStr(LCase(NomduStyle), "**01_titre_avis") = 0
'---------------------------------------------------------------------------
ok = ok And InStr(LCase(NomduStyle), "**02_intertitre_1._gras") = 0
ok = ok And InStr(LCase(NomduStyle), "**02_intertitre_a)_ital") = 0
ok = ok And InStr(LCase(NomduStyle), "**02_intertitre_A._bdc_gras_ital") = 0
ok = ok And InStr(LCase(NomduStyle), "**02_intertitre_I._rom_cap") = 0
'---------------------------------------------------------------------------
ok = ok And InStr(LCase(NomduStyle), "**02_intertitre_petites_cap") = 0
ok = ok And InStr(LCase(NomduStyle), "**02_intertitre_romain_bdc") = 0
ok = ok And InStr(LCase(NomduStyle), "**03_texte_courant") = 0
ok = ok And InStr(LCase(NomduStyle), "**03_texte_courant_av_sign") = 0
ok = ok And InStr(LCase(NomduStyle), "**03_texte_num_auto") = 0
ok = ok And InStr(LCase(NomduStyle), "**05_enum_iii") = 0
ok = ok And InStr(LCase(NomduStyle), "**05_enum_sans_tiret") = 0
ok = ok And InStr(LCase(NomduStyle), "**05_enum_tiret") = 0
ok = ok And InStr(LCase(NomduStyle), "**05_sous_enum_tiret") = 0
ok = ok And InStr(LCase(NomduStyle), "**06_tableau_entete") = 0
ok = ok And InStr(LCase(NomduStyle), "**06_tableau_note") = 0
ok = ok And InStr(LCase(NomduStyle), "**06_tableau_texte") = 0
ok = ok And InStr(LCase(NomduStyle), "**06_tableau_texte_gauche") = 0
ok = ok And InStr(LCase(NomduStyle), "**06_tableau_titre") = 0
ok = ok And InStr(LCase(NomduStyle), "**07_signature_fonction") = 0
ok = ok And InStr(LCase(NomduStyle), "**07_signature_ministre") = 0
ok = ok And InStr(LCase(NomduStyle), "**07_signature_nom") = 0
ok = ok And InStr(LCase(NomduStyle), "**08_decision") = 0
ok = ok And InStr(LCase(NomduStyle), "**09_appel_note_car") = 0
ok = ok And InStr(LCase(NomduStyle), "**09_note") = 0
ok = ok And InStr(LCase(NomduStyle), "Lien hypertexte") = 0
End If
'
If ok Then
On Error Resume Next
If ok Then ActiveDocument.Styles(NomduStyle).Delete
On Error GoTo 0
'
End If
Next S
End Sub |
Partager