Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP 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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
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