我目前正在尝试使用vba将一些图表从excel复制到powerpoint,我正在将它们复制为图片以切断到excel数据的链接但是如果我可以将它们复制为我知道的嵌入式图表将非常有用使用:
CommandBars.ExecuteMso "PasteExcelChartSourceFormatting"
方法,但我无法弄清楚如何将其集成到我的代码中以便使用它
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
任何人都可以帮助我将我的粘贴特效更改为粘贴为嵌入式图表吗?