AnimationBehavior.PropertyEffect 屬性 (PowerPoint)
會傳回指定之動畫行為的 PropertyEffect 物件。 唯讀。
語法
expression。 PropertyEffect
表達 代表 AnimationBehavior 物件的 變數。
傳回值
PropertyEffect
範例
下列範例會將具有效果的圖案新增至作用中的簡報,並且設定圖案的動畫效果屬性以變更色彩。
Sub AddShapeSetAnimFill()
Dim effBlinds As Effect
Dim shpRectangle As Shape
Dim animBlinds As AnimationBehavior
'Adds rectangle and sets animation effect
Set shpRectangle = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShapeRectangle, Left:=100, _
Top:=100, Width:=50, Height:=50)
Set effBlinds = ActivePresentation.Slides(1).TimeLine.MainSequence _
.AddEffect(Shape:=shpRectangle, effectId:=msoAnimEffectBlinds)
'Sets the duration of the animation
effBlinds.Timing.Duration = 3
'Adds a behavior to the animation
Set animBlinds = effBlinds.Behaviors.Add(msoAnimTypeProperty)
'Sets the animation color effect and the formula to use
With animBlinds.PropertyEffect
.Property = msoAnimColor
.From = RGB(Red:=0, Green:=0, Blue:=255)
.To = RGB(Red:=255, Green:=0, Blue:=0)
End With
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應