macros in multiple master slides

G

Guest

I have created a presentation that contains several master slides.

I have written a macro for the first masterslide that modifies the color of
several rectangles as they are clicked on (a menu in fact). It works fine on
all slides using this master.

The problem arrises when I make a similar macro for any subsequent
masterslides. Although I think I correctly reference the rectangle objects,
VB reports shape unknown. Is there something I need to do be explicit about
which subsequent masterslide the macros should execute in?

Or is this the wrong aproach or not a PPT feature?

Please advise
 
S

Steve Rindsberg

Flying pig said:
I have created a presentation that contains several master slides.

I have written a macro for the first masterslide that modifies the color of
several rectangles as they are clicked on (a menu in fact). It works fine on
all slides using this master.

The problem arrises when I make a similar macro for any subsequent
masterslides. Although I think I correctly reference the rectangle objects,
VB reports shape unknown. Is there something I need to do be explicit about
which subsequent masterslide the macros should execute in?

Or is this the wrong aproach or not a PPT feature?

No, you're on the right track. With single master PPT versions, each
presentation has a Slide Master and possibly a Title Master.
With multiple masters, each presentation has a Designs collection; each Design
has a Slide Master and possibly a Title Master.

For starters, note that you can go into the master view, right click the
thumbnail for each of the masters and choose Rename to give it a name that
makes sense to you. So suppose you've done that and named the designs Bob,
Carol, Ted and Alice.

Now assuming you've got a shape named Rectangle 7 on the design you named Bob:

With ActivePresentation.Designs("Bob").SlideMaster.Shapes("Rectangle 7")
' Make it red
.Fill.Forecolor.RGB = RGB(255,0,0)
End With
 
G

Guest

I'm curious about your use of code in the master slide to create a menu...
could you perhaps make an example of this PowerPoint file (just the menu)
available for download? I would like to better understand how your menu
functions. It sound interesting!

Thanks,

art.
 

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