Animating Separate Elements of a Clip Art Image in Powerpoint 2007
Microsoft Powerpoint, Tips & Tricks Add comments
In the previous section, you learned how to hide different parts of an image and then uncover them one at a time using separate exit effects. This was necessary because PowerPoint doesn’t have a feature that lets you animate portions of an image. If you use clip art, however, it is possible to apply animation effects to different parts of the drawing. This is made possible by the fact that most clip art images are actually composed of many separate shapes. In a drawing of a building, for example, the background, exterior shell, windows, and doors might be separate images. These are grouped together to form a single image, but in most cases, you can ungroup the clip art to work with its component shapes directly. For example, you can give each shape a different entrance effect so that the clip art image appears to assemble itself on-the-fly when you click to activate the animation.
Here are the steps to follow to ungroup a clip art image and to apply animation effects to the component shapes:
- Choose Insert, Clip Art, use the Clip Art pane to search for and insert the image you want, and then click Close (X) to remove the Clip Art pane.
- With the clip art image selected, choose Format, pull down the Group menu (it’s in the Arrange group), and then click Ungroup.
- In most cases, PowerPoint will ask you if you want to convert the image to a Microsoft Office drawing object. If so, click Yes.
- If PowerPoint has to convert the image to a Microsoft Office drawing object, repeat Step 2 to ungroup the drawing object. PowerPoint separates out the various shapes and selects them.
- Choose Animations, Custom Animation to display the Custom Animation task pane.
- Choose Add Effect, select an effect category, and then select an effect. PowerPoint applies the effect to every shape.
- Use the Custom Animation pane to apply a different effect property to each shape. For example, if you applied the Fly In effect, use the Direction list to apply a variety of directions to the shapes: From Bottom, From Left, From Top-Right, and so on.
- If you want the shapes to run at the same time (this is the default), click any shape effect in the Custom Animation pane, press Ctrl+A to select all of the shapes, and then use the Start list to choose With Previous.
If there’s a downside to this technique, it’s that some clip art images contain dozens of comÂponent shapes. Tweaking each shape by hand to vary the effects becomes a chore. A better idea in this case it to use a VBA macro to assign effects randomly.
PowerPoint VBA comes with a number of PpEntryEffect constants that represent the difÂferent types of entry effects. Table 1 lists these constants, their numeric values, and the effects they produce.
NOTE
VBA’s PpEntryEffect constants are a quirky group. Some of them—such as Cover and Uncover—don’t correspond with entrance effects in the PowerPoint interface.There also seems to be quite a few missing. For example, the Circle effect has an Out direction but not an In direction, and there are no constants for effects such as Expand, Float, and Sling.
Table 1 VBA’s PpEntryEffect Constants




You use these constants with the Shape object’s AnimationSettings collection, which has an EntryEffect property. In our case, we want to assign the effects randomly among the ungrouped clip art shapes. To do that, you use Table 1 to find the General Effect you want and then examine the range of values associated with that effect. For example, the general Fly In effect has eight associated effects: From Left to From Bottom Right, the valÂues of which range from 3329 to 3336. In VBA, you use the Rnd function to generate ranÂdom numbers, and you generate a random number between (or equal to) two numbers by using the following general expression:
Int((highest -lowest + 1) * Rnd + lowest)
Here, lowest is the lowest number in the range, and highest is the highest number in the range. So for example, the following expression generates random numbers between 3329 and 3336:
Int((3336 – 3329 + ) * Rnd + 3329
You can use a formula similar to this to run though the shapes in an ungrouped clip art image and assign the random values to the EntryEffect property. Listing 1 shows some VBA code that does this:
Listing 1 A VBA procedure That Applies Random Effects to a Clip Art’s Ungrouped Shapes

You supply the nEffectFirst and nEffectLast variables with, respectively, the lower and upper values in the range of effects you want to use. The code then runs through the selected shapes in the ungrouped clip art, using the formula from earlier in this section to choose a random effect and apply it to the EntryEffect property.
Technorati Tags: animating clip art image, powerpoint2007
Popularity: 2% [?]








Recent Comments