VBA-how to refrence placeholders beside Title.

  • Thread starter Thread starter Edward
  • Start date Start date
E

Edward

Hi everybody,
In PP 2007 ( it applies to 2003 as well)
It's easy to refrence title place holder , something like
ActivePresentation.Slides(1).Design.SlideMaster.CustomLayouts1).Shapes. _
Title.TextFrame.TextRange.Font.Color.RGB=vbRed

but for other placeholders like subtitle or footer I use shape count
ActivePresentation.Slides(1)
..Design.SlideMaster.CustomLayouts(1).Shapes(4).TextFrame.TextRange.Font.Color.RGB =vbRed

This code is defecult for maintenance , because if we add a new shape in our
master shape numbers change, also I'm converting my code from 2003 to 2007
and these shape numbering seems to be changed and I need to test for each
shape to make sure I'm referncing the correct shape.

My question is " Is there any easier way to refrence placeholders in our
masters?"
 
Edward,
My recommended approach would be to make use of the placeholders collection
and then check for the desired placeholder type to reference the correct
placeholder.

?Activepresentation.Designs(1).SlideMaster.CustomLayouts(1).Shapes.Placeholders(1).PlaceholderFormat.Type

Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how
 
Thanks. Good suggestion :)
--
Best regards,
Edward


Shyam Pillai said:
Edward,
My recommended approach would be to make use of the placeholders collection
and then check for the desired placeholder type to reference the correct
placeholder.

?Activepresentation.Designs(1).SlideMaster.CustomLayouts(1).Shapes.Placeholders(1).PlaceholderFormat.Type

Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how
 
Back
Top