Option Explicit
Sub Export_Ppt()
'necessite d'activer la reference Microsoft Powerpoint Object Library
Dim PptDoc As Object, PPT As Object, NbShpe As Byte
'''''''''''''''''''''''''''''''''''''''''''''''
Set PPT = CreateObject("Powerpoint.Application")
PPT.Visible = True 'l'application sera visible
Set PptDoc = PPT.Presentations.Open(ThisWorkbook.Path & "/Présentation1.ppt") 'ouverture fichier ppt
Dim Feuille As Worksheet, I As Integer, J As Integer, NbreGraphiques As Integer
I = 2
For Each Feuille In ThisWorkbook.Worksheets
NbreGraphiques = Feuille.Shapes.Count
For J = 1 To NbreGraphiques
If Feuille.Shapes(J).Name <> "CommandButton1" Then
PptDoc.Slides.Add I, ppLayoutBlank
Feuille.Shapes(J).Copy
PptDoc.Slides(I).Shapes.Paste
I = I + 1
End If
Next J
Next
PptDoc.Save 'sauvegarder les modifications
PptDoc.Close 'fermer le document ppt
PPT.Quit 'fermer l'application powerPoint
End Sub