Sub
ChartsNachPPT()
Set
objPPT = CreateObject(
"PowerPoint.Application"
)
PPTVorlage =
"C:\Presentation1.pptx"
objPPT.Visible =
True
Set
objPres = objPPT.Presentations.Open(PPTVorlage)
Set
objSlide = objPres.Slides(1)
x = 1
For
Each
cht
In
ActiveWorkbook.Sheets(
"Sheet2"
).ChartObjects
cht.CopyPicture xlPrinter, xlPicture
Set
oSR = objPres.Slides(4).Shapes.Paste
x = x + 1
oSR.Align msoAlignCenters, msoTrue
oSR.Align msoAlignMiddles, msoTrue
Next
x = 1
For
Each
cht
In
ActiveWorkbook.Sheets(
"Sheet3"
).ChartObjects
cht.CopyPicture xlPrinter, xlPicture
Set
oSR = objPres.Slides(10).Shapes.Paste
x = x + 1
oSR.Align msoAlignCenters, msoTrue
oSR.Align msoAlignMiddles, msoTrue
Next
PPTDateiname = Application.GetSaveAsFilename _
(FileFilter:=
"PPT Files (*.pptx), *.pptx"
)
Set
objPres =
Nothing
objPPT.Quit
Set
objPPT =
Nothing
End
Sub
Jetzt hiermit habe ich aber dass Problem, dass alle z.b 5 diagramme eines Sheets direkt im zentrum e
iner Slide angezeigt werden!!
Wie bekomme ich es hin dass die Diagramme schoen positioniert sind???
Danke schonmal
Gruesse