Casting a Master to a Slide

  • Thread starter Thread starter Mark Kestenbaum
  • Start date 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
 
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.
 
Back
Top