Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

pauldamen
Contributor II

Exporting to ppt

Dear all,

I am looking for a macro to export objects to ppt.

What I need is to be able to select different objects accross different slides and copy them to fixed positions in an existing ppt. So for example object CH01 needs to be intergrated in slide 4 of an existing ppt.

Can some one help me with this macro, I did found general macro's to copy whole sheets but not as specific as I need it.

Regards,

Paul

11 Replies
MVP
MVP

Exporting to ppt

pauldamen
Contributor II

Re: Exporting to ppt

Thanks for the reply

I found those links as well but I just can't get them to work for me. Copying whole sheets is no problem but I need to be able to copy specific images.

I attached a dressed down version of my application, hope you can help me.

Regards,

Paul

Not applicable

Re: Exporting to ppt

Hi Pauldamen,

Can you share the code or the process that you are following for exporting QD sheet to PowerPoint. Thanks.

Not applicable

Re: Exporting to ppt

Try this macro

Sub Export2PPT_IndividualCharts

Set PPApp = CreateObject("Powerpoint.Application")

PPApp.Visible = True ' Create a presentation

Set PPPres = PPApp.Presentations.Add

Set PPSlide = PPPres.Slides.Add(1, 1)

PPSlide.Shapes(1).Delete ' removes the title

PPSlide.Shapes(1).Delete ' removes the text box

ActiveDocument.GetSheetObject("CH198").CopyBitmapToClipboard

ActiveDocument.GetApplication.WaitForIdle

  with PPSlide.Shapes.Paste

      .Left  = 150

      .Top  = 50

      .Width = 150

      .Height = 450

     end with

PPPres.SaveAs "C:\Individual.ppt" 'comment this if you dont want ppt to close automatically

PPPres.Close          'comment this if you dont want ppt to close automatically

PPApp.Quit      'comment this if you dont want ppt to close automatically

Set PPSlide = Nothing

Set PPPres = Nothing

Set PPApp = Nothing

End Sub

You may have to change the values .Left, .Top, .Width, .Height. I tried the above values then check in ppt and alter the values again.

vinicius_siquei
New Contributor III

Re: Exporting to ppt

Guys I´m trying to use this script, however I´m getting expected object error message for the lines:

      .Left  = 150

      .Top  = 50

      .Width = 150

      .Height = 450

Any idea of how to solve that ?

Not applicable

Re: Exporting to ppt

Sorry for the late reply.

I think the actual error is coming from this line:
"with PPSlide.Shapes.Paste"
because .Left ... .Top has got nothing in it to throw an error... Its just setting the co-ordinates.

Anyways, did u manage to solve it ?

vijetasharma
Contributor III

Re: Exporting to ppt

I have tried above code but, I am getting error ,

 

ActiveX component can't create object: 'Powerpoint.Application'

MVP
MVP

Re: Exporting to ppt

Hi,

Do you Powerpoint installed in your machine??

Regards,

jagan.

Not applicable

Re: Exporting to ppt

Hi Jagan,

     The linkages are longer valid. Do you know other link(s) i can learn about Exporting to PPT.

Thank you very much!

Zhou

Community Browser