PDA

View Full Version : Delete Powerpoint slide which contains zero values



shaneaon1984
04-03-2014, 02:01 AM
Hi,

I am trying to create a macro that will delete a slide based on certain criteria. I have a number of PowerPoint slides. Each slide contains a graph with certain values. I want to craete a macro that will combine all the slides into a presentation but will not include the slides with zero values in the graph.

Any help would be gratefully appreciated

Thanks

p45cal
04-03-2014, 02:37 AM
Can you confirm that you're wanting to do this from Excel?
Is Excel making the slides in the first place?
What code do you have so far?
Perhaps provide a link to a file (or attach a file here if you're allowed).

Sorry that I ask more questions rather than give answers but there isn't much to go on.

shaneaon1984
04-03-2014, 03:04 AM
Hi, Thank you for responding to me.

Basically I have number PowerPoint slides, each containing a column chart with different values. However, some of the charts have zero values. I would like to join all the PowerPoint slides into one presentation but exclude the slides that have zero values in the chart.

I have a macro that will join the PowerPoint slides together (created in excel) but it also joins in the PowerPoint slides where the charts have zero values.

If you could provide me with a basic macro that will delete slides based on the chart value.

Apologies for being so vague, but the macro i have created is very sensitive so cannot upload to here.

Thank you so much for your help

p45cal
04-03-2014, 04:51 AM
macro i have created is very sensitive so cannot upload to here.This makes things very hard.
Does the macro create the slides? If so, rather than delete slides, it would be easier never to create them in the first place. It is possible to examine an Excel chart's series data chart in Excel, but I'm not sufficiently conversant with PowerPoint charts to know if the same can be done there.
What form do the charts have in PowerPoint; are they just pictures (in which case it will be difficult/impossible to determine which have zero values), are they embeddede Excel charts, or charts native to powerpoint?

When you say a macro is sensitive, I'm not sure what you mean. You can redact sensitive info such as path and filenames, company names etc. to dummy ones. It's unlikely the code itself can be sensitive.

Also important: what versions of the applications are you using?

ps. I've just had a look at some charts in PowerPoint and it looks it might be possible to determine values if they are true charts,