RotationEffect オブジェクト
Microsoft PowerPoint Visual Basic リファレンス |
RotationEffect オブジェクト
AnimationBehavior RotationEffect |
AnimationBehavior オブジェクトの回転効果を表します。
使い方
RotationEffect オブジェクトを取得するには、AnimationBehavior オブジェクトの RotationEffect プロパティを使用します。次の使用例は、指定したアニメーション動作の回転効果を参照します。
ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).RotationEffect
オブジェクトのアニメーション回転を設定するには、RotationEffect オブジェクトの By、From、および To プロパティを使用します。次の使用例は、スライド 1 に新しい図形を追加し、回転のアニメーション動作を設定します。
Sub AddRotation()
Dim shpNew As Shape
Dim effNew As Effect
Dim aniNew As AnimationBehavior
Set shpNew = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShape5pointStar, Left:=0, _
Top:=0, Width:=100, Height:=100)
Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _
.AddEffect(Shape:=shpNew, effectId:=msoAnimEffectCustom)
Set aniNew = effNew.Behaviors.Add(msoAnimTypeRotation)
With aniNew.RotationEffect
'現在の位置から 270 度回転します。
.By = 270
End With
End Sub