Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I am a very new user - QV11 and would like to find out that i can import qv objects to PowerPoint. I i'd just like to know if there is a way of automatically updating the ppt document? And can one write a script in visual c#? Please help!
Hi thaborabs,
We can export the qv objects to ppt using the macro(vbscript).
Below i mentioned some example script to export the qv objects to ppt .
sub powerpoint
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True
Set PPPres = PPApp.Presentations.Open ("C:\xxx\xxx.ppt")
PPApp.Visible = True
ActiveDocument.Reload
ActiveDocument.GetApplication.WaitForIdle
set s=ActiveDocument.Sheets("Summary")
ActiveDocument.Sheets("Summary").Activate
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.GetSheetObject("CH28").Restore
ActiveDocument.GetSheetObject("CH28").CopyBitmapToClipboard
PPApp.Visible = True
Set PPSlide = PPPres.Slides(11)
PPSlide.Shapes.Paste
ActiveDocument.GetSheetObject("CH28").Minimize
ActiveDocument.GetApplication.WaitForIdle
set PPApp = nothing
set PPPRes = nothing
set PPSlide = nothing
ActiveDocument.SaveAs "C:\xxx\xxx.qvw"
ActiveDocument.GetApplication.Quit
end sub
Try this and let me know your feedback.
Regards
Ashok
Hi thaborabs,
We can export the qv objects to ppt using the macro(vbscript).
Below i mentioned some example script to export the qv objects to ppt .
sub powerpoint
Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True
Set PPPres = PPApp.Presentations.Open ("C:\xxx\xxx.ppt")
PPApp.Visible = True
ActiveDocument.Reload
ActiveDocument.GetApplication.WaitForIdle
set s=ActiveDocument.Sheets("Summary")
ActiveDocument.Sheets("Summary").Activate
ActiveDocument.GetApplication.WaitForIdle
ActiveDocument.GetSheetObject("CH28").Restore
ActiveDocument.GetSheetObject("CH28").CopyBitmapToClipboard
PPApp.Visible = True
Set PPSlide = PPPres.Slides(11)
PPSlide.Shapes.Paste
ActiveDocument.GetSheetObject("CH28").Minimize
ActiveDocument.GetApplication.WaitForIdle
set PPApp = nothing
set PPPRes = nothing
set PPSlide = nothing
ActiveDocument.SaveAs "C:\xxx\xxx.qvw"
ActiveDocument.GetApplication.Quit
end sub
Try this and let me know your feedback.
Regards
Ashok
Hi Ashok,
Thank you for your reply.
When loading the script in the edit module window and hitting the 'test' button i get a message that "ActiveX component can't create object: ("Powerpoint.Application").
Could this be that i am running on QV Personal Edition?
Hi,
It needs the Microsoft office to be installed with powerpoint presentation. Have you installed ?
Celambarasan
Hi,
Check Requested module security in the edit module dialog is selected as System Access and also check the current local security.
Celambarasan
hi,
Microsoft office is installed on my workstation yes.
It works.
The issue was the security settings. Thanks aMillion guys.
HI,
The script you wrote me runs until ActiveDocument.GetApplication.WaitForIdle
From there highlights the next line set s=ActiveDocument.Sheets("Summary")
Any idea as to why it may be doing so?
Hi,
Its may be you don't have the sheet summary.Please look in to that.
Celambarasan
hi Celambarasan,
Please provide more clarity as to what you mean by saying ‘don't have the sheet summary’
thank you.