PowerPoint Automation

B

Bruce

Hi,

I am trying to automate the display of a slide show in Powerpoint:

1) In my application, I have Next and Previous buttons, and a current
slide and total slides indicator. I want to disable the Previous
button if I am on the first slide, and disable the Next button if I am
on the last slide. This all works great as long as their is no
animation.

For example, if I base this behavior on the slide number, the Next
button is disabled when the last slide is displayed, even though there
may be additional elements of that slide that need a "next slide" to
display.

What I am looking for is the ability to not only enumerate slides but
also to enumerate elements within slides. Is this possible?

2) How do I launch the Powerpoint file in a way in which only the
actual slide show display is visible? (I don't want to see the
application window or the slide show "document" window.)

3) Is it possible to get representations of the slides in a
presentation that can be displayed as miniatures in my application (a
preview view of sorts)?

4) How do I duplicate the behavior of choosing to display the slide
show on the secondary monitor?

Thanks...

-Bruce
 
D

David M. Marcovitz

Is this what you are looking for? It is a VBA procedure that counts how
many objects on the first slide have animations.

Sub HowManyAnimate()
Dim shp As Shape
Dim myCount As Long

myCount = 0
For Each shp In ActivePresentation.Slides(1).Shapes
If shp.AnimationSettings.Animate = msoTrue Then
myCount = myCount + 1
End If
Next
MsgBox myCount
End Sub

--David


--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
S

Shyam Pillai

Bruce,
What I am looking for is the ability to not only enumerate slides but
also to enumerate elements within slides. Is this possible?
The procedure to enumerate the number of animations on the slide is
dependant on the version of PowerPoint. Animations in 97/2000 are totally
different from the ones in PowerPoint 2002/2003.
2) How do I launch the Powerpoint file in a way in which only the
actual slide show display is visible? (I don't want to see the
application window or the slide show "document" window.)
Display PowerPoint slide show within a VB form or control window
http://www.mvps.org/skp/vb/pptvbwnd.htm
3) Is it possible to get representations of the slides in a
presentation that can be displayed as miniatures in my application (a
preview view of sorts)?
No native methods to achieve this. You will need to build your own
miniatures by exporting the slides as images at the desired miniature
resolution.
4) How do I duplicate the behavior of choosing to display the slide
show on the secondary monitor?
No shortscuts to achieve this too. It is not supported in the object model
so you will need to use windows API.
 

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