Bonjour,
Voici une macro pour word
Sub essai()
Selection.HomeKey unit:=wdStory
supp "te"
End Sub
Private Sub supp(txt)
Selection.HomeKey unit:=wdStory
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.MatchWildcards = False
.Text = Chr(11)
.Replacement.Text = vbCr
.Execute Replace:=wdReplaceAll
End With
Selection.HomeKey unit:=wdStory
With Selection.Find
.Replacement.Text = ""
.Text = txt
.Execute
End With
While Selection.Find.Found
Selection.MoveRight
Selection.MoveUp unit:=wdParagraph, Count:=1, Extend:=wdMove
Selection.MoveDown unit:=wdParagraph, Count:=1, Extend:=True
Selection.Delete
Selection.Find.Execute
Wend
End Sub