Share via

How to programmatically add “Shrink and Turn” animation in PowerPoint VBA?

Anonymous
2023-09-16T04:22:47+00:00

I'm trying to create an effect that is VERY simple to add iteratively, but I can't seem to find it when doing it programmatically.

Iteratively, you select the shape, go to the Animation tab, and add the “Shrink and Turn” effect, and presto!

However, when adding an effect through VBA, you do:

<slide>.TimeLine.MainSequence.AddEffect(<shape>, <effect>)

But... There's a BUT!

There is an msoAnimEffectGrowAndTurn but there is not a msoAnimEffectShrinkAndTurn.

How can I do it?

Ah, yes! Checking a “Shrink and Turn” effect once it has been manually added the effect type is INDEED msoAnimEffectGrowAndTurn.
But it has no option to change its behavior to a “Shrink and Turn”.
Or at least none that I could find.

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2023-09-16T11:29:03+00:00

Shrink and Turn can only be added as an EXIT.

Assuming osld and oshp are the slide / shapes and oeff is the Effect set the effect to GROW & turn and then set Exit to true

Dim oeff As Effect

Dim osld As Slide

Dim oshp As Shape

Set oeff = osld.TimeLine.MainSequence.AddEffect(oshp, msoAnimEffectGrowAndTurn)

oeff.Exit = True

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful