Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Qlikview to PPT

I have a macro which takes all sheets to PPT.  I am looking for a macro where I can click on one object on a sheet and send it to PPT.  Does anyone have one they are willing to share?

Thanks

Thom

2 Replies
srinivasa1
Creator II
Creator II

Hi

can you pls paste your code.im also doing some work on this might i can help.

Thanks

tmumaw
Specialist II
Specialist II
Author

Here you go.....

 

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