I am currently trying to copy some charts from excel to powerpoint using vba and I am currently copying them as pictures to sever the link to the excel data but it would be really useful if I could copy them as embedded charts I know to use the:
CommandBars.ExecuteMso "PasteExcelChartSourceFormatting"
Method but I can't quite figure out how to go about integrating it into my code in order to use it
Set ppProgram = CreateObject("PowerPoint.Application")
Set PowerPointApp = GetObject(, "PowerPoint.Application")
Set myPresentation = PowerPointApp.Presentations("Filename.pptx")
'Copy Excel Range for Chart 1
WsGraph.ChartObjects("Chart 1").Chart.ChartArea.Copy
Set mySlide = myPresentation.Slides(5)
'Paste to PowerPoint and position
mySlide.Shapes.PasteSpecial DataType:=ppPasteEnhancedMetafile
Set myShapeRange = mySlide.Shapes(46)
myShapeRange.Left = 60
myShapeRange.Top = 143
myShapeRange.ZOrder msoSendToBack
myShapeRange.ZOrder msoBringForward
Can anyone help me with changing my paste special to pasting as an embedded chart?