Ici, on recherche le texte situé entre les balises < et >
Edit
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 Sub RechercheEnBoucle() Dim fin as boolean Dim LeMot as string Selection.HomeKey Unit:=wdStory With Selection.Find .Text = "[<]*[>]" .Forward = True .Wrap = wdFindContinue End With Do While Not fin fin = Selection.Find.Execute = False If Not fin Then _ LeMot = Mid(Selection.Text, 2, Len(Selection.Text) - 2) Selection.MoveRight Unit:=wdCharacter, Count:=1 Loop End Sub
Apparemment, cette solution ne fonctionne pas (plus !)
Une explication sur le post suivant
Partager