Does layout for a specific slide contain a title placeholder?

D

Dave Jenkins

I have a PPT 2007 presentation whose slides use any of a number of different
layouts. Most of the layouts contain placeholders for a slide title, some do
not. I'd like to determine (in VBA) whether the layout for a given slide
contains a placeholder for a slide title.

Is that info reachable? And if so, will the same set of code work for a PPT
2003 pres?

Thanks.
 
J

John Wilson

Do you need to know whether the slide has a title placeholder or whether the
parent layout does (it could have been deleted on the slide)?
 
D

Dave Jenkins

The second - that's exactly what I'm trying to determine: Given that a slide
may not have a title placeholder on it, I want to know if the layout for the
slide _did_ contain a title placeholder, and if so I want to do some further
processing.
 
D

Dave Jenkins

Phewey! Kind of like winding your watch with a pickaxe and a hacksaw isn't
it?

And anway, since I'm not concerned about the slide itself -- I'm just
wanting to find out if its *layout* contains a title placeholder -- the code
I mentioned above seems to work OK.

I'll let it ride until something falls apart in production and then worry
about it some more then.

Thanks, Steve.
 
D

Dave Jenkins

I beleive you're right, John - it will fail on a custom layout containing a
title placeholder when the target slide has none. It looks like the
slide.mastr returns only a non-custom layout, but that slide.customlayout
will return any layout - is that how you see it?

If so, that's pretty poor property naiming, don't you think?

At any rate - please expand on your 2003 comment, since this code must run
there, too. (My 2003 laptop is refusing to power up tonight, so I can't test
this.) Are you saying it will crash? I could put code in to do the
custompayout version of the test on 2007, and the slide.master version on
2003 to circumvent crashes. The downside is that the 2003 version won't be
100% accurate. I think I can live with that though.

OTOH, Steve's suggestion begins to ahve some merit. I could create a
slide,using the same layout as the original. If it has a title shape, and
the original does not, then that's what I'm looking for. Wouldn't be that
hard to code ... hmmm.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top