Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
pradeepm
Contributor II
Contributor II

Export to PPT Macro help

Hi All,

Is there anyway to export charts/objects from multiple sheets to ppt.

can we do this using vbmacro script

Regards,

Pradeep

3 Replies
m_woolf
Master II
Master II

You should search the forum before asking:

https://community.qlik.com/message/1109278#1109278

pradeepm
Contributor II
Contributor II
Author

Hi mw,

I need to define the position of each chart in ppt slide from all the qlikview sheets

and i am not able to find the required script from forum.

Initially i have exported complete dashboard to ppt, but the output is overlapping the ppt slides. So, i thought to export by defining height & width for each object. But this is working only for one sheet.

sub ppt


Set PPApp = CreateObject("PowerPoint.Application")

Set PPPres = PPApp.Presentations.Add

    Set PPSlide = PPPres.Slides.Add(1,2)

    PPSlide.Shapes(1).Delete

    PPSlide.Shapes(1).Delete


put "Document\TX267",PPSlide,100,60

    PPApp.ActiveWindow.Selection.ShapeRange.Width = 40

    PPApp.ActiveWindow.Selection.ShapeRange.Height = 40  

  

    put "Document\CH31",PPSlide,150,100

    PPApp.ActiveWindow.Selection.ShapeRange.Width = 130

    PPApp.ActiveWindow.Selection.ShapeRange.Height = 150

                

FileLoc = CreateObject("WScript.Shell").SpecialFolders("Desktop")

PPPres.SaveAs FileLoc & "/Test_Project" & ".pptx"

PPPres.Close

PPApp.Quit


Set PPSlide = Nothing

Set PPPres = Nothing

Set PPApp = Nothing

msgbox "PPT Extract Successful",64,"Complete"

end sub 


sub put(obj,pps,x,y)

ActiveDocument.GetSheetObject(obj).CopyBitmapToClipboard

pps.Shapes.Paste

Set o = pps.Shapes(pps.Shapes.Count)

o.Left = x

o.Top = y

end sub

Can you help me how can i do this for all the sheets at a time

Frank_Hartmann
Master II
Master II

I think this is what you need:

how to export different objecttypes into a powerpoint document

If you need further assitance feel free to ask

hope this helps