' --------------------------------------------------------------------- ' Copyright ©1999-2007, Shyam Pillai, All Rights Reserved. ' --------------------------------------------------------------------- ' You are free to use this code within your own applications, add-ins, ' documents etc but you are expressly forbidden from selling or ' otherwise distributing this source code without prior consent. ' This includes both posting free demo projects made from this ' code as well as reproducing the code in text or html format.
' You may include acknowledgement to the author and a link to this site. ' ----------------------------------------------------------------------
Function IsShapeAnimated(oShp As Shape) As Boolean
Dim oEffect As Effect
With oShp.Parent.TimeLine.MainSequence
Set oEffect = .FindFirstAnimationFor(oShp)
If oEffect Is Nothing Then
IsShapeAnimated = False
Else
IsShapeAnimated = True
End If
Set oEffect = Nothing
End With
End Function
Sub Test()
With ActivePresentation.Slides(1)
If IsShapeAnimated(.Shapes(1)) Then
MsgBox "Shape is animated", vbInformation, "Shape Animation"
Else
MsgBox "Shape is not animated", vbInformation, "Shape Animation"
End If
End With
End Sub
Related:Assign
interactive animation |