1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Dim ppapp As PowerPoint.Application
Dim Presentation As PowerPoint.Presentation
Set ppapp = CreateObject("Powerpoint.application")
ppapp.Activate
' Ouverture du fichier modèle powerpoint, qui servira de base à la présentation
Set Presentation = ppapp.Presentations.Open(CurrentProject.Path & "\template.ppt")
With Presentation.Slides(5)
' partie spécifique à access, je ne sais pas comment récupérer un graphe à partir d'excel mais ça ne doit pas être bien sorcier ;)
' Ouverture du formulaire contenant le graphe
DoCmd.OpenForm "Graph1", acPreview
' Copie du graphe
Me.Application.Forms("Graph1")![OLEUnbound0].Action = acOLECopy
' On colle le graphe dans la présentation
.Shapes.Paste
' Fermeture du formulaire contenant le graphe
DoCmd.Close acForm, "Graph1"
' Déplaçage et redimensionnement du graphe
.Shapes(4).Width = 500
.Shapes(4).Height = 480
.Shapes(4).Top = 30
.Shapes(4).Left = 10
End With |
Partager