Please help with Powerpoint Macro

  • Thread starter Thread starter frankeegirl123
  • Start date Start date
F

frankeegirl123

Hello everyone,

I am not a programmer. I am a high school history teacher. I am
developing many powerpoint slides for a novel new curriculum to teach
9-12 graders, US, World and European History.

But I need help writing a powerpoint macro.

All I want is to automate the "entry effect" and the "exit effect." In
other words, I just want to highly an object in powerpoint, click
button, and have it enter; click another button and have it exit. I
have figured out how to do this with a highlighted object to enter
with the following:

Sub Enter()
With ActiveWindow.Selection.ShapeRange.AnimationSettings
.Animate = msoTrue
.EntryEffect = ppEffectCheckerboardAcross
End With
End Sub

But do not know how to do this to exit an object. I have read that all
Ihave to do is set the exit property to true, BUT I DON'T KNOW HOW TO
DO THAT. I have searched hours. I know it is simple to do, but I am
not a programmer. Please help. I you can give me the exact code for
simply exiting an object that has been selected, I will be grateful.
All my students will appreciated it.

Sincerely,
France
 
First question: Are you using PPT 2002 or newer? Earlier versions didn't
have exit animations. If you are using a version that includes exit
animations, then ...

Is there a reason you need to do this via code? I would do it via triggered
entrance and exit animations. To do this, add your animations as normal.
Select the entrance animation, right click and select Timings. At the bottom
of the dialog, you will see a button marked Triggers. Click that button.
Change to Start on click of... and select your object. OK your way out and
repeat the process for the exit animation. Play the slide and you should be
able to test the triggers.

--
Kathy Jacobs, Microsoft MVP OneNote and PowerPoint
Author of Kathy Jacobs on PowerPoint
Get PowerPoint and OneNote information at www.onppt.com

I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived
 
First question: Are you using PPT 2002 or newer? Earlier versions didn't
have exit animations. If you are using a version that includes exit
animations, then ...

Is there a reason you need to do this via code? I would do it via triggered
entrance and exit animations. To do this, add your animations as normal.
Select the entrance animation, right click and select Timings. At the bottom
of the dialog, you will see a button marked Triggers. Click that button.
Change to Start on click of... and select your object. OK your way out and
repeat the process for the exit animation. Play the slide and you should be
able to test the triggers.

--
Kathy Jacobs, Microsoft MVP OneNote andPowerPoint
Author of Kathy Jacobs onPowerPoint
GetPowerPointand OneNote information atwww.onppt.com

I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived














- Show quoted text -

Thank you for your reply Ms. Jacobs.

I am running PPT 2002.

I think your way will work, but it involves a lot of clicks. I want to
be able to select an object, and just click a macro button to exit. I
am working on well over 3,000 slides (not all in the same file) some
of the slides will have exits, some will have entrances, some will
have both, some will have neither, some will have more entrances and
less exits ... blah blah bla. It would be really helpful to have the
code for have an item I select be exited when I click a macro button.

Many thanks,
France
 
I would go with Kathy's suggestion, there's no real need to use code.

If you must though you have to use the timeline not animation effects.

Something like
Sub Animexit()
Dim oEffect As Effect
Dim oshp As Shape
Set oshp = ActiveWindow.Selection.ShapeRange(1)
Set oEffect = ActiveWindow.Selection.SlideRange.TimeLine _
..MainSequence.AddEffect(oshp, msoAnimEffectCheckerboard, _
msoAnimateLevelNone, msoAnimTriggerOnPageClick)
oEffect.EffectParameters.Direction = msoAnimDirectionAcross
oEffect.Exit = msoTrue
End Sub
 
Back
Top