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

ppt macro problems - help needed!

Hi guys,

I wish to create a macro which pastes static objects to a Powerpoint document via a button using a macro. I have seen a thread about this but it does not solve my problem. There are a number of objects on various tabs. The problem I am encountering is that if I try to reference another tab in the macro it does not work.

For example. I have a button on tab1. If the button is on Tab1 the charts from that tab will paste correctly into the powerpoint document via the macro. But in the next part of my macro when i try to reference eg Tab2 eg: ActiveDocument.Sheets("Tab2").Activate it does not work. It seems to not work because the button is located on Tab1 and this is the sheet which the user is currently on(active). Has anyone any ideas how to overcome this as it is becoming a major stumbling block in our development.

Just to summarise: In my macro I wish to reference copying and pasting charts from a number of tabs in my qvw via a button which is located on one tab.

Thanks in advance,

9 Replies
Not applicable
Author

Just a thought. Have you checked that the object is not minimized?

If the objects are minimized I have had some issues with copying the charts - if objects are minimized on tab2, you should look at the "restore" function.

Then it should work (at least in theory)

/Martin

Not applicable
Author

Hi Martin,

None of the charts are minimised so not sure what the problem is unfortunately. It just seems to ignore my reference to the tab. i tried it with a number of other tabs and encountered the same problem.

suniljain
Master
Master

ih you want to export chart from another tab . it is unable to export export. It can export from same tab olny.

I faced same issue and done lots of RnD but till now donot get success.

you have to keep all chart in single tab only.

Not applicable
Author

Thanks Sunil,

At least this confirms my fears! It was driving me slightly insane Tongue Tied

Not applicable
Author

Hi,

It is pure nonsense, that you have to keep all objects on the same sheet.

I have attached an extremely simple document for testpurpose and it works, if you include the magical text "WaitForIdle" 🙂

/Martin

Not applicable
Author

Thanks for this Martin,

I'll give it a go..fingers crossed!

Not applicable
Author

Seems to work Martin,

That's great. Only other question I really have is when adding a new slide, and pasting new objects to it, it seems to create a new "slide 1" whereas i would expect it to create is as the slide after the one that has just been created. I'm sure it's something simple but can't see what it is.

maneshkhottcpl
Partner - Creator III
Partner - Creator III

Hi,

It is possible to export the charts in PPT of all sheets.

please refer the attached documents. The inputs are welcome.

Manesh Khot

srinivasa1
Creator II
Creator II

Hi,

Its
really awesome example ..but how I can do sheet1 all chart   object
in one slide and sheet2 object other slide. Now all object comes in different slide.

thanks