Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
saurabh5
Creator II
Creator II

Macro to export sheet to ppt

hi All,

i have to export a  sheet as an image to ppt and excel, with the length and width specified in the macro using a button object.so that the user would be able to export the image on a click.Does anybody has a pseudo code to do such an operation.

Thanks for the help

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps one of the discussions returned by this search answers your question: https://community.qlik.com/search.jspa?q=macro+sheet+powerpoint


talk is cheap, supply exceeds demand
vinod2086
Creator II
Creator II

Hi Saurabh,

try this to export to ppt

Sub ExportPPT

ActiveDocument.ActiveSheet.FitZoomToWindow

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Add

    For i = 0 To ActiveDocument.NoOfSheets - 1

   '     Set MySheet = ActiveDocument.GetSheet(i)

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

   '     ActiveDocument.ActiveSheet.CopyBitmapToClipboard

           ActiveDocument.GetSheetObject("CH03").CopyBitmapToClipboard

        PPSlide.Shapes.Paste

           ActiveDocument.GetSheetObject("CH04").CopyBitmapToClipboard

        PPSlide.Shapes.Paste

    Next

Set PPSlide = Nothing

Set PPPres = Nothing

End sub

export to excel

sub ExportToQVD()
  path="c:\path\"
set obj1=ActiveDocument.GetSheetObject("Current_PP")
obj1.ExportEX Path&"PP_CURRENT.csv" , 4
end sub