-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEffaceEntreesIndexDansTitre
More file actions
30 lines (30 loc) · 1.04 KB
/
EffaceEntreesIndexDansTitre
File metadata and controls
30 lines (30 loc) · 1.04 KB
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
Sub EffaceEntreesIndexDansTitres()
Selection.HomeKey Unit:=wdStory, Extend:=wdMove
With Selection.Find
.ClearFormatting
.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
Do While Selection.Find.Found = True
If Selection.Paragraphs.OutlineLevel = wdOutlineLevel1 Or _
Selection.Paragraphs.OutlineLevel = wdOutlineLevel2 Or _
Selection.Paragraphs.OutlineLevel = wdOutlineLevel3 Or _
Selection.Paragraphs.OutlineLevel = wdOutlineLevel4 Or _
Selection.Paragraphs.OutlineLevel = wdOutlineLevel5 Or _
Selection.Paragraphs.OutlineLevel = wdOutlineLevel6 Or _
Selection.Paragraphs.OutlineLevel = wdOutlineLevel7 Then
Selection.Delete
End If
Selection.Find.Execute
Loop
MsgBox ("Fini !")
End Sub