Detecting placeholders in vba

N

NabilShuh

I have created a number of placeholders in my master layout (e.g. footnotes,
subtitle etc). These are standard text placeholders. What I need to do is
detect what they are programatically so that I can auto populate them. When
creating them is there a way I can tag them in any way within the template?

Thanks
 
E

Edward

In addition to what Steve suggested, you can use shape numebrs. You can write
a simple code and fine each shape number in your masters and then use those
shape numebrs in your code.
something lik
ActivePresentation.Slides(1).Design.SlideMaster.Shapes(4).TextFrame.TextRange.Text=" your text"
Just rememeber shape numebrs is masters are not necessarily the same as
shape numebrs on slides, so you have to make sure you are reffering to each
shape in slide masters or in slide object.
Also you can refer to some shapes with a special name in VBA for eample
ActivePresentation.Slides(1).Design.SlideMaster.Shapes.Title ......
which refers to title place holder.
 
N

NabilShuh

Yes the numbers way did the job. Thanks

Steve Rindsberg said:
As long as you're *absolutely* certain that nobody will ever add or remove shapes from the
master, using the numbers might be safe. Might be. I wouldn't trust it though.

But as soon as you add a shape to a slide or master and send it to back, every one of your shape
numbers changes and any code that relies on it just died. Oooooops. ;-)


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

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