ever want to do any thing with that ob ject again). Thus,
we need to set a vari able
to point to the new ob ject (us ing
Set
because it is an object):
Sub AddStar()
Set myShape = _
ActivePresentation.SlideShowWindow.View.Slide.Shapes.AddShape _
(msoShape16pointStar, 100, 100, 100, 100)
End Sub
Now, we are in good shape! If you hit En ter, noth ing will turn red, but we
won’t know if it works un til we try it.
Go back to PowerPoint, go to Slide Show
View, and click on your but ton. If all goes well, you
will now have a new shape
on your slide.
Of course, if you click on the but ton a second time, noth ing will hap pen. Or,
it will ap pear that nothing hap pens. That is be cause you will create an other shape
on top of the first shape. If you go back
into Edit View in PowerPoint, you can
see that you have two shapes by dragging one of the shapes out of the way.
Do'stlaringiz bilan baham: