vba automation between Excel and PowerPoint - dynamic PP charts
Posted on 2009-02-18
I have a large automation project which I took on, not realizing I may be going down a dead end. I have done a lot of Excel automation projects, but this is the first time I'm working with PowerPoint, and it is less than desirable.
So, the client has a PowerPoint template with about 120 slides, about 45 are dynamic, having text or graphs on them that need to be modified based on data I'm importing into Excel. So I want to open an instance of the template, modify all the text and graphs and save as something else.
I can open and replace all text, looping through each slide. BUT, I have a bunch of slides with multiple graphs. And there doesn't seem to be any way I can distinguish which graph is which. From the PP interface, I can't see the name of the graph, or the ID, which I can access from excel/vba. So I can't see which is which.
I have to let the client hand me the template, and what I'd like to be able to do is go to properties or something on the graph object and see which graph is which.
And it seems like very few people have worked with PP before. I've worked with Access and Word, as many others have, but not PP.
If I can't see which graph is which, is there at least some logic where I can figure out which is which, like where it is placed on the slide? My guess is no, that the number is generated when it was created, not by where it is placed.
Has anybody done a project like this?