naming shapes in PowerPoint: slightly different question/issue

G

Guest

I'm like to name a shape (eg. a PlaceHolder or text box) on my slide master,
and store it in a .pot file. Then I would like to create a new presentation,
apply my .pot template to it, and create a bunch of new slides, each
containing a PlaceHolder or text box bearing the name saved in my .pot file
(eg. "Jim's Box"). Is this doable and if so how? I think I'm missing some
basic understanding of how PowerPoint templates and/or macros work.

Here's what I currently do:
- Open PowerPoint
- Go to the master slide
- Select the PlaceHolder text box
- Run the SetShapeName() macro in ch. 8 of David M's sample code for his book
- Check the name of the text box using the GetShapeName() macro (and the
shape is correctly named)
- Save the presentation as a .pot file
- Create a new PPT presentation and apply my .pot template using Apply Slide
Layout (not sure if this is the correct way to apply the template)
- Create a new slide (hopefully from the master)
- And surprise, instead of the new PlaceHolder text box name set to my new
name (eg. "Jim's Box"), it's named "Rectangle 3"

Am I doing this correctly, or missing something basic?

The reason for using a common shape name on every is so I can write macros
that scan or loop through my slides looking for the same shape on every slide
and perform some operation on it, like changing the font or writing the
contents to a file.
 
D

David M. Marcovitz

I don't believe that the name of the shape on the master translates to a
new name on a slide. If you name a placeholder on the master and then
create a new slide (without even saving as .pot and opening a new
presentation), the new slide will not retain the shape names.

You might be making this more complicated than necessary (or you might
not). When you create new slides that have a title area and a text area,
the text area always starts out being named "Rectangle 3" so you might
just be able to check for "Rectangle 3" to make your changes. For most
things that you do to the slide, "Rectangle 3" will remain named
"Rectangle 3". This is different from using the shape number 2 which is
more likely to change through the process of normal editing of your
slide.

--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
S

Steve Rindsberg

David's right - the name of the placeholder doesn't become the name of the shape
based on that placeholder.
The reason for using a common shape name on every is so I can write macros
that scan or loop through my slides looking for the same shape on every slide
and perform some operation on it, like changing the font or writing the
contents to a file.

On the other hand, you may be able to work out which shape is which in a more
roundabout way.

Get a reference to a placeholder on a slide
http://www.rdpslides.com/pptfaq/FAQ00681.htm
 

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