pwerpoint presentation duration

M

mabond

I want VB or VBA to be able to tell when it opens a presentation what the
duration of that presentation is (i.e. the total slide transition time for
each slide). Does anyone know how to do this

Thanks

Michael Bond
 
D

David M. Marcovitz

The following code will tell you total transition time for each slide,
but this ignores automatic animations within each slide:

Sub TranTime()
Dim totalTranTime
Dim sld As Slide

totalTranTime = 0
For Each sld In ActivePresentation.Slides
totalTranTime = totalTranTime + _
sld.SlideShowTransition.AdvanceTime
Next sld

MsgBox "The total transition time for slides will be " & _
totalTranTime & " seconds."
End Sub


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

mabond

David

perfect thanks....its only the transition time I need

Much obliged

Michael Bond
 
M

mabond

Steve

Thanks for that addition ..... I didn't specify in my posting the reason for
my requirement so you have no idea how useful that little addition is. My
application finds every presentation in a particular directory and runs the
slide show on each presentation in turn. The presentation PC is linked to a
TV screen(s) in the main areas where employees work. Thus any team leaders,
managers, HR peaople etc can quickly get info displayed to employees by
simply writing and saving a powerpoint presentation of their own design to
that directory. My application needs to know the duration of the slide show
so it can go to sleep for that period before closing the show and opening the
next one..... and yes, you were right, I hadn't thought of the possibility of
hidden slides in the presentation.

Thanks very much to both of you for your help with this. I've always
appreciated the expertise found through these discussion groups.

Regards

Michael Bond
 
M

mabond

Steve

It's rough around the edges (result of an amatuer designer...I am entirley
self taught when it comes to coding) but, importantly, it does eactly what I
need it to do....and even more importanlty what my bosses want it to do. I'll
spend some time over the next few weeks polishing it up and getting rid of
the "jittery" bits...but, as I say, it works. I ended up translating the code
into VB.NET2003 (cos that's the way our Tech Support want to go). If you
think it is of any use to you, or any of the folks with whom you have
contact, let me know and I'll gladly send you a text copy of the code

Regards

Michael Bond
Planning and Information Manager
RNID Typetalk, the UK's National Telephone Relay Service for the Deaf
 
D

David M. Marcovitz

Thanks for catching that. I bet there are few more possibilities we can
think of. For example, what if the slide show is set to play only slides
5 to 10? I'm glad I don't do coding for a living. I would hate to have
to think of every possible way my code could mess up.
--david

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

mabond

Steve and David

I've actually got a better solution for the ways this can be messed up
....... my users (i.e. the designers of the presentations) don't actually know
enough about PowerPoint to be able to set slide shows to run specific slides
(well not yet anyway!!)

Thanks both

Michael
 
B

Bill P

Thanks guys. I am trying to cut 5 minutes off a presentation and without
this you can't imagine how hard that is to do!
 

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