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.
--
Dave Jenkins
K5KX
"John Wilson" wrote:
> Hi Dave
>
> I think your code will usually work BUT it will maybe fail if a NEW custom
> layout with no title is created?
>
> Maybe this is more reliable but it won't work in 2003
> Slide.CustomLayout.Shapes.HasTitle
> --
> Amazing PPT Hints, Tips and Tutorials
>
> http://www.pptalchemy.co.uk/powerpoi...tutorials.html
> _______________________________
>
>
>
>
> "Dave Jenkins" wrote:
>
> > 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.
> > --
> > Dave Jenkins
> > K5KX
> >
> >
> > "Steve Rindsberg" wrote:
> >
> > > In article <79533316-67B8-4E6B-8545-(E-Mail Removed)>, Dave Jenkins
> > > wrote:
> > > > I'm thinking slide.master.shapes.hastitle may do it ...?
> > > >
> > >
> > > How about creating a new slide based on the same layout as the one you're
> > > querying and iterate through the shapes on it?
> > >
> > > -----------------------------------------
> > > Steve Rindsberg, PPT MVP
> > > PPT FAQ: www.pptfaq.com
> > > PPTools: www.pptools.com
> > > ================================================
> > >
> > >
> > >