bonsoir

je cherche à résoudre mon problème. J'ai une macro qui fonctionne très bien sous powerpoint97/2003 mais plus sous 2007. La macro a la fonction d'un moteur de recherche. Dans la combox, on tape un mot, la macro affiche les unes après les autres toutes les slides qui comportent le mot. Mon diapo comprend beaucoup de slides et mes utilisateurs au bureau ont du mal à s'y retrouver. D'où la necessité de cette macro. Mais voilà, j'ai migré 2007, et bug! Merci pour votre aide. Ci dessous ma macro :

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
17
18
19
20
21
22
23
Sub RechercheMotClé()
mot = InputBox("Entrer le Mot recherché")
For Each sld In Application.ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
Set txtRng = shp.TextFrame.TextRange
Set foundText = txtRng.Find(FindWhat:=mot)
Do While Not (foundText Is Nothing)
With foundText
.Font.Bold = True
Set foundText = _
txtRng.Find(FindWhat:="PROUT", _
After:=.Start + .Length - 1)
End With
SlideShowWindows(1).View.GotoSlide (sld.SlideIndex)
r = MsgBox("Le MOT recherché est affiché en caractère GRAS - Clic sur Suivant pour une autre proposition !", vbOKCancel)
If r = vbCancel Then Exit For
Loop
End If
Next
If r = vbCancel Then Exit For
Next
End Sub