Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.60 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Copy chart from Excel to PowerPoint preserving quality and transparency
  2. ActiveSheet.ChartObjects("MyChartNameGoesHere").CopyPicture Appearance:=xlScreen, Format:=xlPicture
  3. Set PPApp = GetObject(, "Powerpoint.Application")
  4. Set PPPres = PPApp.ActivePresentation
  5. Set PPSlide = PPPres.Slides(PPApp.ActiveWindow.Selection.SlideRange.SlideIndex)
  6. PPSlide.Shapes.PasteSpecial(ppPasteEnhancedMetafile).Select
  7.        
  8. For Each Grf In E.ActiveSheet.ChartObjects
  9.     Grf.Copy
  10.     Sld.Shapes.Placeholders(Nr).Select msoCTrue
  11.     P.ActivePresentation.Windows(1).View.PasteSpecial (ppPasteMetafilePicture)
  12.     Nr = Nr + 1
  13. Next Grf