Casting a Master to a Slide

  • Thread starter Mark Kestenbaum
  • Start date
M

Mark Kestenbaum

I have several methods which perform operations on shapes on a slide. These
methods take a Slide as a parameter and loop through the shapes on the
slide, performing the desired actions.

Unfortunately, if I want to do the same for Shapes on a Master slide, I have
to write a separate method, since I can't pass a Master as a parameter to a
method that takes a Slide. On the face of it, this seems silly, since Masters
and Slides seem so similar. Is it really impossible to cast a Master to a
Slide? Is there some other object further up the heirarchy which is common to
both Slides and Masters?

Thanks,

Mark
 
S

Steve Rindsberg

Mark Kestenbaum said:
I have several methods which perform operations on shapes on a slide. These
methods take a Slide as a parameter and loop through the shapes on the
slide, performing the desired actions.

Unfortunately, if I want to do the same for Shapes on a Master slide, I have
to write a separate method, since I can't pass a Master as a parameter to a
method that takes a Slide. On the face of it, this seems silly, since Masters
and Slides seem so similar. Is it really impossible to cast a Master to a
Slide? Is there some other object further up the heirarchy which is common to
both Slides and Masters?

No. I don't know how one would solve the problem in C/C++, but in VB/VBA, you'd
write the function to take a generic Object as the paramater rather than a
Slide.
 

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