Bonjour,
je ne comprends pas pourquoi mon code ne fonctionne pas :
il ne se passe rien
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 Sub DtEx 'Supprime la ligne Dim pAra As Paragraph 'on revient au début du document Selection.HomeKey Unit:=wdStory For Each pAra In ActiveDocument.Paragraphs 'condition : si fin de paragarphe = Toto If Right(pAra, 5) = " Toto" Then 'on sélectionne la ligne Selection.MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend Selection.Delete Unit:=wdCharacter, Count:=1 ' Supp End If Next pAra End Sub
Merci de votre aide
Partager