VBA - how to determine if a shape is visible when the slide first loads

  • Thread starter Thread starter roytang
  • Start date Start date
R

roytang

Hi,

In 2002 and above, each shape can have several different animations,
including entry and exit effects. Is there an easy way to determine
whether a shape is visible at the start of the slide being displayed?

I was thinking I just need to check if the first animation in the
timeline for that shape is an entrance effect, but I'm not sure how to
determine whether an effect is an entrance effect or not.

Any suggestions? Thanks

Roy
 
See if this helps at all ( I don't guarantee that 52 is the correct value but
it seems to work and there are 52 entrance animations)

Sub whattype()
Dim oeff As Effect
Dim i As Integer
Dim strtype As String
With ActivePresentation.Slides(1).TimeLine
For i = 1 To .MainSequence.Count
Set oeff = .MainSequence(i)
If oeff.EffectType < 53 And oeff.Exit = False Then strtype = "Entrance"
If oeff.EffectType < 53 And oeff.Exit = True Then strtype = "Exit"
If oeff.EffectType > 52 Then strtype = "Other"
MsgBox oeff.DisplayName & " (" & strtype & ")"
Next
End With
End Sub
 
Back
Top