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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Exporting to ppt

Hi all,

I got error in macro. how to resolve this.

Error:

Object required: 'ActiveDocument.GetSheetObject(...)'

Macro code:

Sub ppt

'An array with the objects you want to export to powerpoint
Dim myArray(4)
myArray(0) = "CH01"
myArray(1) = "CH02"
myArray(2) = "CH03"
myArray(3) = "CH04"
myArray(4) = "CH05"

'Create ppt object
Set objPPT = CreateObject("PowerPoint.Application")
objPPT.Visible = True
Set objPresentation = objPPT.Presentations.Add

'Apply a template if you want one
'objPresentation.ApplyTemplate _
' ("C:\mytemplate.potx")

'For each object in the array create a new slide and paste it.
For each item in myArray

Set PPSlide = objPresentation.Slides.Add(1,11)
ActiveDocument.GetSheetObject(item).CopyBitmapToClipboard
PPSlide.Shapes.Paste

Next

'Clean up
Set PPSlide = Nothing
Set PPPres = Nothing
Set PPApp = Nothing

End Sub

Thanks,

Krishna

2 Replies
Anil_Babu_Samineni

Krishna,

Prepare PPT from different QVW objects with Macro

For Ref

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
syukyo_zhu
Creator III
Creator III

Hi,

I think your have a trouble in this code. can you check you get a value from variable item.

ActiveDocument.GetSheetObject(item).

error means macro dont find object(defined in your varable item)  in your appli qlikview.

Hope helpful