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
| Sub X()
Dim ppt As PowerPoint.Application
Dim pptdoc As PowerPoint.Presentation
Dim Nbshpe As Byte
Set ppt = CreateObject("Powerpoint.Application") 'creation session PowerPoint
ppt.Visible = True
Set pptdoc = ppt.Presentations.Open("LIEN SOURCE.pptm") 'ouverture fichier ppt
'Slide16
ActiveSheet.PivotTables("TCDA1").CopyPicture xlScreen, xlBitmap
pptdoc.Slides(16).Shapes.Paste
Nbshpe = pptdoc.Slides(16).Shapes.Count
With pptdoc.Slides(16).Shapes(Nbshpe)
.Name = "TCDA1" 'personnaliser le nom de l'image insérée
.Left = 30 'position horizontale dans le slide
.Top = 100 'position verticale dans le slide
.Height = 450 'hauteur image
.Width = 600 'largeur image
End With
End Sub |
Partager