Sub
excel_to_pp()
Dim
strPPTX
As
String
Dim
strPfad
As
String
Dim
pptVorlage
As
String
Dim
pptApp
As
Object
Dim
pptPres
As
Presentation
strPfad = "C:\Users\A49966070\Desktop\Reporting VBA\"
strPPTX =
"cockpit_vorlage.pptx"
Set
pptApp =
New
PowerPoint.Application
pptApp.Visible =
True
pptVorlage = strPfad & strPPTX
pptApp.Presentations.Open Filename:=pptVorlage, untitled:=msoTrue
Set
pptPres = pptApp.ActivePresentation
Dim
rngSh
As
ShapeRange
Workbooks(
"Testdatei.xlsm"
).Sheets(
"Workload_Eingang"
).ChartObjects(
"Mittelwert"
).CopyPicture xlScreen, xlPICT
Set
rngSh = pptPres.Slides(2).Shapes.PasteSpecial(DataType:=ppPasteEnhancedMetafile)