Sub produits()
Dim k As Byte
'on déclare une variable de type application PowerPoint
Dim PPT As PowerPoint.Application
Dim Sh As PowerPoint.Shape
' On crée maintenant un objet Presentation
Dim Pres As PowerPoint.Presentation
Dim strat As String
If Userform1_propale.CheckBox_Forward = True Then
strat = Userform1_propale.caption
End if
Set PPT = CreateObject("PowerPoint.Application")
PPT.Visible = True 'Indispensable, sinon il ne peut pas ouvrir de fichier (Erreur)
' Et on lui dit de quelle présentation il s'agit :
Set Pres = PPT.Presentations.Open("\\.ppt")
With Pres
'lien slide 2(Sommaire)
.Slides(2).Shapes("Rectangle 2").TextFrame.TextRange.Text = "I. PRODUITS" & Chr(13) & _
Chr(13) & _
" " & strat
End With
Pres.SaveAs "\\.ppt"
MsgBox "Propale terminée."
End Sub