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

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top