Home > other >  How to insert chart copied from Excel with .PasteSpecial method in PowerPoint as SVG?
How to insert chart copied from Excel with .PasteSpecial method in PowerPoint as SVG?

Time:10-01

I am copying a chart from Excel with the below code:

oChartObject.Chart.CopyPicture(Excel.XlPictureAppearance.xlScreen, Excel.XlCopyPictureFormat.xlPicture)

Now I want to insert this chart in PowerPoint as SVG image. I am using .PasteSpecial but the PpPasteDataType enum does not seem to accept SVG (enter image description here

My question: how can I paste a chart copied from Excel as SVG to PowerPoint?

CodePudding user response:

SVG is a comparatively new format in Office. It hasn't been added to the VBA object model yet. Instead, try using ppPasteEnhancedMetafile. This pastes as EMF, a vector format that has better support from Microsoft.

  • Related