Macro sur Word

Bonjour tout le monde, j'espère qu'on pourrait me trouver une solution pour mon problème!
En fait, ce code ne marche pas correctement! Je veux faire une boucle de recherche tout simplement, et selon le mot recherché, exécuter par suite une instruction.

Begin:
If Selection.Find
.Text = "*KR"
.Replacement.Text = "^c"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Then GoTo Tom1
End If

If Selection.Find.Text = "*IP" Then GoTo Tom2
GoTo Fin

1 réponse