A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Question re. use of animation rebuild VBA



 
 
Thread Tools Display Modes
  #1  
Old May 5th, 2010, 12:09 AM posted to microsoft.public.powerpoint
RJ
external usenet poster
 
Posts: 83
Default Question re. use of animation rebuild VBA

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
  #2  
Old May 5th, 2010, 12:25 AM posted to microsoft.public.powerpoint
Shyam Pillai
external usenet poster
 
Posts: 622
Default Question re. use of animation rebuild VBA

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" wrote in message
...
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


  #3  
Old May 5th, 2010, 12:30 AM posted to microsoft.public.powerpoint
Shyam Pillai
external usenet poster
 
Posts: 622
Default Question re. use of animation rebuild VBA

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" wrote in message
...
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


  #4  
Old May 5th, 2010, 01:43 AM posted to microsoft.public.powerpoint
RJ
external usenet poster
 
Posts: 83
Default Question re. use of animation rebuild VBA

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" wrote in message
...
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


  #5  
Old May 5th, 2010, 03:36 PM posted to microsoft.public.powerpoint
David Marcovitz[_2_]
external usenet poster
 
Posts: 130
Default Question re. use of animation rebuild VBA

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
  #6  
Old May 5th, 2010, 04:57 PM posted to microsoft.public.powerpoint
RJ
external usenet poster
 
Posts: 83
Default Question re. use of animation rebuild VBA

Would it be possible to have code that would both return the slide and
rebuild the animation all in one action button and what would that code look
like?
--
RJ


"David Marcovitz" wrote:

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
.

  #7  
Old May 5th, 2010, 05:03 PM posted to microsoft.public.powerpoint
David Marcovitz[_2_]
external usenet poster
 
Posts: 130
Default Question re. use of animation rebuild VBA

Yes, now that I'm not looking at the original message, I'm not sure, but
I thought that was what the code was that you posted. The GotoSlide
method has two parameters: the slide number to go to and whether or not
to reset the animation on that slide. Something along the lines of:

ActivePresentation.SlideShowWindow.View.GotoSlide 3, msoTrue

says go to slide 3 and reset the animation (msoFalse would not reset the
animation).

--David

On 5/5/10 11:57 AM, RJ wrote:
Would it be possible to have code that would both return the slide and
rebuild the animation all in one action button and what would that code look
like?



--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
  #8  
Old May 5th, 2010, 07:26 PM posted to microsoft.public.powerpoint
RJ
external usenet poster
 
Posts: 83
Default Question re. use of animation rebuild VBA

Thanks very much David. You were very helpful.
--
RJ


"David Marcovitz" wrote:

Yes, now that I'm not looking at the original message, I'm not sure, but
I thought that was what the code was that you posted. The GotoSlide
method has two parameters: the slide number to go to and whether or not
to reset the animation on that slide. Something along the lines of:

ActivePresentation.SlideShowWindow.View.GotoSlide 3, msoTrue

says go to slide 3 and reset the animation (msoFalse would not reset the
animation).

--David

On 5/5/10 11:57 AM, RJ wrote:
Would it be possible to have code that would both return the slide and
rebuild the animation all in one action button and what would that code look
like?



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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.