Tuesday 31 May 2016

Qlikview to PPT | Qlik Community

Qlikview to PPT | Qlik Community: "sub ppt1
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True
Set PPPres = PPApp.Presentations.Add

for j = 0 to ActiveDocument.NoOfSheets - 1

ActiveDocument.Sheets(j).Activate
set ss= ActiveDocument.GetSheet(j)
shID =ucase(mid(ss.GetProperties.SheetID,10))
shName=ss.GetProperties.Name
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.Sheets(shName).Activate
ActiveDocument.Sheets(j).Activate
set s=ActiveDocument.ActiveSheet
Set PPSlide = PPPres.Slides.Add(1, 1)
PPSlide.Shapes(1).Delete ' removes the title
PPSlide.Shapes(1).Delete ' removes the text box
ActiveDocument.Activesheet.CopyBitmapToClipboard
PPSlide.Shapes.Paste

next

PPPres.SaveAs "C:\temp\MyPresentationPPT.ppt"
PPPres.Close
PPApp.Quit
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing
end sub


'sub sheetsOBJ
'ActiveDocument.Activesheet.CopyBitmapToClipboard
'end sub

sub ppt2
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True ' Create a presentation
Set PPPres = PPApp.Presentations.Add

set s=ActiveDocument.Sheets("Sold / Pending")
charts=s.GetGraphs
for i=lbound(charts) to ubound(charts)
Set PPSlide = PPPres.Slides.Add(1, 1)
PPSlide.Shapes(1).Delete ' removes the title
PPSlide.Shapes(1).Delete ' removes the text box
ActiveDocument.GetSheetObject(charts(i).getobjectid).CopyBitmapToClipboard
PPSlide.Shapes.Paste
next

' PPPres.SaveAs "C:\f1\MyPresentation.ppt"
' PPPres.Close
' PPApp.Quit
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing
end sub"



'via Blog this'

No comments: