Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Krishna,
Prepare PPT from different QVW objects with Macro
For Ref
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