From: RJ on
Hello,

I am preparing a interactive ppt for use at a kiosk and would like to
utilize the following VBA code into a macro in order to rebuild animation on
previously viewed slides:

Sub ResetSlide()

' The number after GotoSlide is the slide number.
SlideShowWindows(1).View.GotoSlide 1, msoTrue

End Sub

(Dumb) Q#1: Does the part of the code that says " ' The number after
GotoSlide is the slide number." stay in the code or is that just an
instruction to the code user? Either way, does the (number) need to be
changed for each situation?

Q#2: Where does this macro get inserted? I do not want the user to have to
take an action to rebuild the animation. I would like it done automatically
so that whenever the slide is revisited, the animation will play.

Example: The viewer views slide #3 and then navigates around to different
slides using action buttons. Eventually the viewer (or a subsequent viewer)
returns to slide #3 via another action button. Where is the macro installed?
Can an action button both send a viewer to a particular location AND run the
rebuild macro, or can the macro run automatically somehow after the slide
plays?

Any and all help would be most appreciated.

Thanks!



RJ
From: Shyam Pillai on
Hi,

> (Dumb) Q#1: Does the part of the code that says " ' The number after
> GotoSlide is the slide number." stay in the code or is that just an
> instruction to the code user? Either way, does the (number) need to be
> changed for each situation?
The number will change based on the slide you want to go to. If you specify
1 it will go to the 1st slide and reset the animations on that slide.

> Q#2: Where does this macro get inserted? I do not want the user to have to
> take an action to rebuild the animation. I would like it done
> automatically
> so that whenever the slide is revisited, the animation will play.

The macro gets inserted in a code module. The triggering mechanism would be
either a shape with action setting set to run the macro or called from an
event handler if you want it to be automatic.

> Example: The viewer views slide #3 and then navigates around to different
> slides using action buttons. Eventually the viewer (or a subsequent
> viewer)
> returns to slide #3 via another action button. Where is the macro
> installed?
> Can an action button both send a viewer to a particular location AND run
> the
> rebuild macro, or can the macro run automatically somehow after the slide
> plays?
The macro is sending the user to the 1st slide and resetting the animation.

I would recommend taking a non programmatic approach to reset the
animation - place a dummy slide with auto slide transition of 0 seconds
duration just before the slide with animation. Set the action setting to
jump to the dummy slide. Anytime you enter into a slide the animations will
be reset.


--
Regards,
Shyam Pillai
Handout Wizard: http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
versions supported.


"RJ" <RJ(a)discussions.microsoft.com> wrote in message
news:3714377B-56B6-4BEF-AB87-72677923C42E(a)microsoft.com...
> Hello,
>
> I am preparing a interactive ppt for use at a kiosk and would like to
> utilize the following VBA code into a macro in order to rebuild animation
> on
> previously viewed slides:
>
> Sub ResetSlide()
>
> ' The number after GotoSlide is the slide number.
> SlideShowWindows(1).View.GotoSlide 1, msoTrue
>
> End Sub
>
> (Dumb) Q#1: Does the part of the code that says " ' The number after
> GotoSlide is the slide number." stay in the code or is that just an
> instruction to the code user? Either way, does the (number) need to be
> changed for each situation?
>
> Q#2: Where does this macro get inserted? I do not want the user to have to
> take an action to rebuild the animation. I would like it done
> automatically
> so that whenever the slide is revisited, the animation will play.
>
> Example: The viewer views slide #3 and then navigates around to different
> slides using action buttons. Eventually the viewer (or a subsequent
> viewer)
> returns to slide #3 via another action button. Where is the macro
> installed?
> Can an action button both send a viewer to a particular location AND run
> the
> rebuild macro, or can the macro run automatically somehow after the slide
> plays?
>
> Any and all help would be most appreciated.
>
> Thanks!
>
>
>
> RJ

From: Shyam Pillai on
You might find this useful -
PPT2000: How to Use VBA Events to Reset Slide Builds
http://support.microsoft.com/kb/276353


--
Regards,
Shyam Pillai
Handout Wizard: http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
versions supported.

"RJ" <RJ(a)discussions.microsoft.com> wrote in message
news:3714377B-56B6-4BEF-AB87-72677923C42E(a)microsoft.com...
> Hello,
>
> I am preparing a interactive ppt for use at a kiosk and would like to
> utilize the following VBA code into a macro in order to rebuild animation
> on
> previously viewed slides:
>
> Sub ResetSlide()
>
> ' The number after GotoSlide is the slide number.
> SlideShowWindows(1).View.GotoSlide 1, msoTrue
>
> End Sub
>
> (Dumb) Q#1: Does the part of the code that says " ' The number after
> GotoSlide is the slide number." stay in the code or is that just an
> instruction to the code user? Either way, does the (number) need to be
> changed for each situation?
>
> Q#2: Where does this macro get inserted? I do not want the user to have to
> take an action to rebuild the animation. I would like it done
> automatically
> so that whenever the slide is revisited, the animation will play.
>
> Example: The viewer views slide #3 and then navigates around to different
> slides using action buttons. Eventually the viewer (or a subsequent
> viewer)
> returns to slide #3 via another action button. Where is the macro
> installed?
> Can an action button both send a viewer to a particular location AND run
> the
> rebuild macro, or can the macro run automatically somehow after the slide
> plays?
>
> Any and all help would be most appreciated.
>
> Thanks!
>
>
>
> RJ

From: RJ on
Thank you. I have already tried the dummy slide to reset the animation, but
it only seemed to work once, which made me wonder if the 0:00 auto-advance on
the dummy was itself an animation that could only be played once?
--
RJ


"Shyam Pillai" wrote:

> You might find this useful -
> PPT2000: How to Use VBA Events to Reset Slide Builds
> http://support.microsoft.com/kb/276353
>
>
> --
> Regards,
> Shyam Pillai
> Handout Wizard: http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
> versions supported.
>
> "RJ" <RJ(a)discussions.microsoft.com> wrote in message
> news:3714377B-56B6-4BEF-AB87-72677923C42E(a)microsoft.com...
> > Hello,
> >
> > I am preparing a interactive ppt for use at a kiosk and would like to
> > utilize the following VBA code into a macro in order to rebuild animation
> > on
> > previously viewed slides:
> >
> > Sub ResetSlide()
> >
> > ' The number after GotoSlide is the slide number.
> > SlideShowWindows(1).View.GotoSlide 1, msoTrue
> >
> > End Sub
> >
> > (Dumb) Q#1: Does the part of the code that says " ' The number after
> > GotoSlide is the slide number." stay in the code or is that just an
> > instruction to the code user? Either way, does the (number) need to be
> > changed for each situation?
> >
> > Q#2: Where does this macro get inserted? I do not want the user to have to
> > take an action to rebuild the animation. I would like it done
> > automatically
> > so that whenever the slide is revisited, the animation will play.
> >
> > Example: The viewer views slide #3 and then navigates around to different
> > slides using action buttons. Eventually the viewer (or a subsequent
> > viewer)
> > returns to slide #3 via another action button. Where is the macro
> > installed?
> > Can an action button both send a viewer to a particular location AND run
> > the
> > rebuild macro, or can the macro run automatically somehow after the slide
> > plays?
> >
> > Any and all help would be most appreciated.
> >
> > Thanks!
> >
> >
> >
> > RJ
>
From: David Marcovitz on
The dummy slide should work multiple times. It would probably be the
best approach. If you are using VBA, to elaborate on Shyam's answer
(which was exactly right)...

#1 In VBA, a single quote in a line indicates a comment. Anything after
the single quote is ignored by the computer. You can remove any
comments, but they are helpful to the reader of the code (and, in your
case, the modifier of the code).

#2 If you are not using an event handler (which adds another level of
complexity to this), then the code needs to go in a procedure which will
be assigned to a button. Instead of having a regular hyperlink to a
slide, you would have a the button that would have had the hyperlink
link to the procedure that contains that code.

--David

On 5/4/10 8:43 PM, RJ wrote:
> Thank you. I have already tried the dummy slide to reset the animation, but
> it only seemed to work once, which made me wonder if the 0:00 auto-advance on
> the dummy was itself an animation that could only be played once?


--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland