Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export to PPT

Hi Community,

I created button to run macro, it can export the chart to PPT when I test in module.

But it is not functioning when I clicked the button on dashboard. Anyone has solution?

Code:

Sub ppt

Dim myArray(9)

myArray(0) = "CH393"

Set objPPT = CreateObject("PowerPoint.Application")

objPPT.Visible = True

Set objPresentation = objPPT.Presentations.Add

For each item in myArray

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

ActiveDocument.GetSheetObject(item).CopyBitmapToClipboard

PPSlide.Shapes.Paste

Next

Set PPSlide = Nothing

Set PPPres = Nothing

Set PPApp = Nothing

End Sub

Thanks and best regards,

csy

19 Replies
Not applicable
Author

Dear Community,

Anyone can figure out why my macro button can only work in module but not on dashboard?

Thanks and best regards,

Chanel

Andrea_Ghirardello

You should write

ActiveDocument.GetSheetObject(MyArray(count))

instead of

ActiveDocument.GetSheetObject(item)

Not applicable
Author

Hi Andrea,

It is executable in module only, do you know why it is no response when i clicked the button on dashboard?Capture.PNG.png

Thanks and best regards,

Chanel

preminqlik
Specialist II
Specialist II

if you have containers ,then macro fails to export from there container occurs,

so once remove all containers and try ..

Andrea_Ghirardello

1. which is the behaviour when you click the button?

2. try this:

a. save the qvw

b. close the qvw

c. open the qvw again and allow macro execution

d. click the button

3. did you add an action to the button (mouse dx\properties\actions tab\click on add button and select the "external" action type\choose the run macro action and write the correct macro name).

Not applicable
Author

hi,

macros only work with the IE Plugin so you have to use Internet Explorer and install the IE Plugin.

Hope it helps.

regards,

MT

Not applicable
Author

Big hug to Andrea! I missed the last last step - Name the macro!

Best regards,

Chanel

Not applicable
Author

Can you use VB code in the Personal Desktop edition of QlikView?

Not applicable
Author

yea, it is working pretty good.

Not applicable
Author

Hi

Do you know how run the macro to copy the whole sheet/selections to ppt, instead of just the chart