Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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

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