Macro sur Word
titukoki
Messages postés
1
Date d'inscription
Statut
Membre
Dernière intervention
-
yg_be Messages postés 23437 Date d'inscription Statut Contributeur Dernière intervention -
yg_be Messages postés 23437 Date d'inscription Statut Contributeur Dernière intervention -
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
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
-
yg_be Messages postés 23437 Date d'inscription Statut Contributeur Dernière intervention Ambassadeur 1 588
bonjour, merci d'utiliser les balises de code, en choisissant "basic" pour du VBA: https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code
par ailleurs, nous montrer un code qui ne fonctionne pas ne va pas nous permettre de comprendre ce que tu veux réaliser.