ich möchte eine Grafik (Diagramm) aus Excel als Bild (Windows Metadatei) in PowerPoint einfügen. Erläuterung: In PPT soll nur noch die Grafik vorhanden sein, derzeit kann man mit Doppelklick die ExcelDatei und zugrundliegende Tabellen sehen.
Dies ist mein Script, wer kann mir einen Tipp oder noch besser die Lösung geben.
Sub Export2PPT()
Dim PPTApp As New PowerPoint.Application
With PPTApp
.Visible = msoTrue
.Presentations.Open ThisWorkbook.Path & "\Cockpit_Level1.ppt"
With .ActivePresentation
Sheets("Diagramm1").ActiveChart.ChartArea.Copy
'ActiveChart.ChartArea.Copy
.Slides(2).Shapes.Paste Type:=xlFormats
dies ist derzeit falsch und ohne "Type:=xlFormats" wird das ExcelDocument eingefügt.
With .Slides(2).Shapes(2)
.Top = 80
.Left = 10
.Width = 350
'.Height = 200
End With
End With 'ActivePresentation
End With 'PPTApp
End Sub