Thanks Jon.
There must be something I don't get because it's not working fine.
Here's my code :
Dim PPApp As PowerPoint.Application
Dim PPPres As PowerPoint.Presentation
Dim PPSlide As PowerPoint.Slide
Dim PresentationFileName As Variant
Dim SlideCount As Long
Dim iCht As Integer
Dim f As Object
Set PPApp =3D CreateObject("Powerpoint.Application")
PPApp.Visible =3D True
' Ins=E8re une nouvelle presentation.
Set PPPres =3D PPApp.Presentations.Add(msoTrue)
Set PPSlide =3D PPPres.Slides.Add(1, ppLayoutBlank)
PPApp.ActiveWindow.ViewType =3D ppViewSlide
' Copie le graphique en image
For Each f In ActiveWorkbook.Charts
Sheets(f.Name).Activate
ActiveChart.CopyPicture Appearance:=3DxlScreen, Size:=3DxlScreen,
Format:=3DxlPicture
SlideCount =3D PPPres.Slides.Count
Set PPSlide =3D PPPres.Slides.Add(SlideCount + 1, ppLayoutBlank)
With PPSlide
.Shapes.Paste
End With
PPApp.ActiveWindow.Selection.SlideRange.Shapes.Ran ge(PPApp.ActiveWindow.Sel=
ection.SlideRange.Shapes.Count).Align
msoAlignCenters, True
SlideCount =3D SlideCount + 1
=20
Next
Can you tell me what's wrong ? Except ME !!
Thank you.
|