Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

krishna4bo
Contributor

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

Re: Exporting to ppt

Krishna,

Prepare PPT from different QVW objects with Macro

For Ref

Life is so rich, and we need to respect to the life !!!
syukyo_zhu
Contributor III

Re: Exporting to ppt

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

Community Browser