Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Export QV objects to ppt template

Colleagues, good day!

My model has macro which export charts to new power point presentation.

Tell me please, is there in qv macro ability to export objects into ppt template (not creating new presentation) ?

There're test model and necessary ppt template in attachment.

Thanks.

24 Replies
Anonymous
Not applicable
Author

Dear, thanks!

It works, but macro export charts into new presentation.

I need to use file template (Template.pptx in attachment)

best regards, Andrey

beck_bakytbek
Master
Master

Hi Kiran,

i posted above my code and you can try to implement in your qv-Environment. Let me know when you solve this issue.

Beck

HirisH_V7
Master
Master

Hi,

You can use that particular Presentation file as per your requirement you can rename it.

-Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable
Author

Dear, thanks for your advice.

But your example manualy create new presentation with text on top and others objects from QV.

I need to use current template, which is, for example, saved on disk D and macro must open it and paste objects from QV.

Best regards, Andrey

Thanks.

Anonymous
Not applicable
Author

i've already solved my problem

Set objPresentation = objPPT.Presentations.Open(datapath with ppt template) instead Set objPresentation = objPPT.Presentations.Add

HirisH_V7
Master
Master

Hirish.

HirisH
“Aspire to Inspire before we Expire!”
beck_bakytbek
Master
Master

Hi Andrey,

can you post you code as example,

thanks a lot

Beck

HirisH_V7
Master
Master

Hi,

Sub ExportPPT 

Set objPPT = CreateObject("PowerPoint.Application") 

objPPT.Visible = True 

Set objPresentation = objPPT.Presentations.open("YourPath\ppt.pptx")'file Path

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

ActiveDocument.GetSheetObject("CH02").CopyBitmapToClipboard 

PPSlide.Shapes.Paste 

PPSlide.Shapes(PPSlide.Shapes.Count).Top = 150 'This sets the top location of the image 

PPSlide.Shapes(PPSlide.Shapes.Count).Left = 15 'This sets the left location 

PPSlide.Shapes(PPSlide.Shapes.Count).Width = 240 

PPSlide.Shapes(PPSlide.Shapes.Count).Height = 250 

 

 

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

ActiveDocument.GetSheetObject("CH02").CopyBitmapToClipboard 

PPSlide.Shapes.Paste 

PPSlide.Shapes(PPSlide.Shapes.Count).Top = 150 'This sets the top location of the image 

PPSlide.Shapes(PPSlide.Shapes.Count).Left = 15 'This sets the left location 

PPSlide.Shapes(PPSlide.Shapes.Count).Width = 100 

PPSlide.Shapes(PPSlide.Shapes.Count).Height = 200 

 

Set PPSlide = Nothing 

Set PPPres = Nothing 

Set PPApp = Nothing 

End Sub 

Thanks,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable
Author

beck_bakytbek
Master
Master

Hirish

Thanks a lot for your Blog/Help/Advice

Beck