Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

objects in powerpoint

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!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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

View solution in original post

15 Replies
Anonymous
Not applicable
Author

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

Not applicable
Author

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?

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     It needs the Microsoft office to be installed with powerpoint presentation. Have you installed ?

Celambarasan

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check Requested module security in the edit module dialog is selected as System Access and also check the current local security.

Celambarasan

Not applicable
Author

hi,

Microsoft office is installed on my workstation yes.

Not applicable
Author

It works.

The issue was the security settings. Thanks aMillion guys.

Not applicable
Author

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?

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Its may be you don't have the sheet summary.Please look in to that.

Celambarasan

Not applicable
Author

hi Celambarasan,

Please provide more clarity as to what you mean by saying ‘don't have the sheet summary’

thank you.