19 Replies Latest reply: Jun 20, 2014 7:04 AM by michele blackburn RSS

    Export to PPT

      Hi Community,

       

      I created button to run macro, it can export the chart to PPT when I test in module.

      But it is not functioning when I clicked the button on dashboard. Anyone has solution?

       

      Code:

      Sub ppt

       

      Dim myArray(9)

      myArray(0) = "CH393"

       

      Set objPPT = CreateObject("PowerPoint.Application")

      objPPT.Visible = True

      Set objPresentation = objPPT.Presentations.Add

       

      For each item in myArray

       

      Set PPSlide = objPresentation.Slides.Add(1,11)

      ActiveDocument.GetSheetObject(item).CopyBitmapToClipboard

      PPSlide.Shapes.Paste

       

      Next

      Set PPSlide = Nothing

      Set PPPres = Nothing

      Set PPApp = Nothing

       

      End Sub

       

       

      Thanks and best regards,

      csy