Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

vijetasharma
Contributor III

Exporting to PPT

Hi, I have used this macro but when I am exporting it creates sheet image in ppt

sub exportppt

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Add

Set PPSlide = objPresentation.Slides.Add(1,11)

ActiveDocument.ActiveSheet.CopyBitmapToClipboard

PPSlide.Shapes.Paste

Set PPSlide = Nothing

Set PPPres = Nothing

Set PPApp = Nothing

End Sub

9 Replies

Re: Exporting to PPT

Hi,

This is happening just because of in your macro you use,

ActiveDocument.ActiveSheet.CopyBitmapToClipboard

//This command copy your current active sheet as Bitmap.

PPSlide.Shapes.Paste

//This Command is used to paste that bitmap file in your PPSlide

Regards,

Regards,
Prashant Sangle
vijetasharma
Contributor III

Re: Exporting to PPT

Ya,that I know,actually I want them as an object in qlikview so, how to do it?

Re: Exporting to PPT

Hi,

Sorry I did not understand what do you want?

Can you explain,

Which object you want to send in your ppt?

Is it only Active Object or all object from current Sheet?

Regards,

Regards,
Prashant Sangle
vijetasharma
Contributor III

Re: Exporting to PPT

all object from sheet

vishalwaghole
Valued Contributor II

Re: Exporting to PPT

Hi Vijeta,

Try with this code,

Set  objPPT = CreateObject("PowerPoint.Application")

       objPPT.Visible = True

set obj = ActiveDocument.GetSheetObject("LB01") 

             obj.CopyBitmapToClipboard()

             curSheet.Range("H" & 4).Select

             curSheet.Paste

- Regards,

Vishal Waghole

vishalwaghole
Valued Contributor II

Re: Exporting to PPT

instead of LB01 put your object Id.

vijetasharma
Contributor III

Re: Exporting to PPT

Hi vishal,

I have tried your macro but ,it just opens blank ppt nothing else

vijetasharma
Contributor III

Re: Exporting to PPT

I have already replace object id my object id

vishalwaghole
Valued Contributor II

Re: Exporting to PPT


Try using this code,

Sub ppt

'An array with the objects you want to export to powerpoint

Dim myArray(1)

myArray(0) = "LB01"


'Create ppt object

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Add


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

Community Browser