Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Dear, thanks!
It works, but macro export charts into new presentation.
I need to use file template (Template.pptx in attachment)
best regards, Andrey
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
Hi,
You can use that particular Presentation file as per your requirement you can rename it.
-Hirish
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.
i've already solved my problem
Set objPresentation = objPPT.Presentations.Open(datapath with ppt template) instead Set objPresentation = objPPT.Presentations.Add
Hirish.
Hi Andrey,
can you post you code as example,
thanks a lot
Beck
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
Thanks a lot for your Blog/Help/Advice
Beck