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
 

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

Back
Top