Dynamic Presentation

B

Bob

I am interested in using PowerPoint as a dynamic presentation
controller. I want to be able to program a "Master" presentation (using
VBA?) that will continuously loop. At the beginning of the loop though
I want it to check a local directory/folder for the presence of other
PowerPoint files. When files are found it will execute them
sequentially (or randomly) always returning control to the master
presentation.

This will be used in a kiosk-style environment where there will be no
user control or input. The sub-presentations will be contributed,
reviewed, and dropped into the forementioned directory/folder and
automatically included in the list of presentations the next time the
master presentation loops back to the begining.

I know how to make a looping presentation I just need to know if
PowerPoint is capable of doing the rest.
 
S

Steve Rindsberg

anyone out there?

Yup. But I guess nobody's done exactly what you're trying to do.

I suspect that it's possible and am sure that it'd require VB/VBA programming.
Haven't done it myself so can't give you chapter and verse on how to proceed.

Kurt? Are you there? Would one of your products handle this type of scenario?
 
G

Guest

Bob;
I've been trying to do something VERY similar.
In my case I know the filenames. The different departments run a vb program
where they mark a checkbox to submit their ppt show. The vb program outputs
a text file that contains the names of the eight department files and a 'y'
or 'n' to say if they should be played or not.
Anyhow, the source code was lost years ago and I'm trying to piece something
together to get this to work.
So far I have where I can play a slide show, but that's about it. Every
example to play a slide show that I can find from the web doesn't work
properly. I haven't found any that actually stop when the slideshow ends.
Very frustrating.
I am working on a solution that uses a timer to play the show based on # of
slides times 5 seconds. This is only a workaround but getting me closer.
If you find anything that works please let me know here. If I find anything
or develop anything you are welcome to it and I will post a msg here for you.
Regards,
Pete
ps: I hope this is clear; it is way past my bedtime!
 
K

Kurt

Hi Steve,
Just woke up:)
No, our products can't help here in the way Bob is asking. We control
everything from 1 presentation only. ShowPoint could send a new
presentation to a monitor (in case of update), but it is not scanning
all ppt's in a folder...
Maybe something for the future.

BTW We have a new website layout and much more content. check it out at
www.presentationpoint.com
 
B

Bob

Thank you everybody for coming back on this. I am still searching for a
solution but if I find anything I'll likewise post it here.
 
K

Kurt

Hi Bob,
I was just coming back to this to add some more...

Maybe we could add this functionality to our free showpoint software.
Bob, in case you are willing to test and comment that new
functionality, then we could go for it.

In case you are interested, please contact me kurt at take-off dot as

Regards.
 
S

Steve Rindsberg

Hi Bob,
I was just coming back to this to add some more...

Maybe we could add this functionality to our free showpoint software.
Bob, in case you are willing to test and comment that new
functionality, then we could go for it.

In case you are interested, please contact me kurt at take-off dot as

Thanks for the followup, Kurt.
 
G

Guest

Bob, & all;

Here is the code I came up with so far. It works to a point. Actually, the
only complaint I have is that I end up with many, many, many instances of
PowerPoint loaded as this program loops.
I tried a couple of things, but can't get rid of this problem.
Look it over and perhaps we can get something working.
Oh, yes. What is going on here is I am reading a text file created by
another program and playing the files marked 'Y'. There are only 8 files,
hence the loop '1 to 8'.
The input file looks like this:

WelcomeSign.ppt;Y
adm.ppt;Y
fin.ppt;Y
rms.ppt;Y
ebs.ppt;Y
hmsr.ppt;Y
rps.ppt;Y
cmsrv.ppt;Y

Here is my code. There are two forms and one Module. Form1 is to start
things off with a button and form2 is just a blue background to obscure the
desktop.

VERSION 5.00
Begin VB.Form Form1
BackColor = &H00C0C0C0&
Caption = "Form1"
ClientHeight = 3630
ClientLeft = 4425
ClientTop = 3150
ClientWidth = 6390
LinkTopic = "Form1"
ScaleHeight = 3630
ScaleWidth = 6390
Begin VB.CommandButton cmdRunShows
Caption = "Run Slide Shows"
BeginProperty Font
Name = "Arial"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 1200
TabIndex = 1
Top = 1680
Width = 3975
End
Begin VB.CommandButton cmdExit
Caption = "E&xit"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 4080
TabIndex = 0
Top = 2640
Width = 1095
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H00E0E0E0&
Caption = "Presentations"
BeginProperty Font
Name = "Arial"
Size = 24
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 600
TabIndex = 3
Top = 720
Width = 5175
End
Begin VB.Label Label1
Alignment = 2 'Center
BackColor = &H00E0E0E0&
Caption = "Lobby PowerPoint"
BeginProperty Font
Name = "Arial"
Size = 24
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 600
TabIndex = 2
Top = 120
Width = 5175
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdExit_Click()

Close
End

End Sub

Private Sub cmdRunShows_Click()

'Do
LobbyForm2.Show
AutomatePpt ("")
LobbyForm2.Hide
' DoEvents
'Loop

End Sub
------------ End of lobby.frm (Form1) ----------------------------

VERSION 5.00
Begin VB.Form LobbyForm2
BackColor = &H00FF0000&
Caption = "Lobby - Form2"
ClientHeight = 11010
ClientLeft = 60
ClientTop = 240
ClientWidth = 15240
LinkTopic = "Form2"
ScaleHeight = 11010
ScaleWidth = 15240
End
Attribute VB_Name = "LobbyForm2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

------------ End of lobbyForm2.frm (Form2) ----------------------------


Attribute VB_Name = "Module1"
'--------------------------------------------------------------------------------
'This module is part of the Lobby.vbp.
'
'
--------------------------------------------------------------------------------

Option Explicit
Global PlayMe(8, 2) As String

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub RunMe()

Dim tmp As String
Dim x, y, z As Integer

Open "f:\public\lobby\yesorno.txt" For Input As #1

'load our array with PPT files to play
For x = 1 To 8
Input #1, tmp
z = InStr(tmp, ";")
PlayMe(x, 1) = Left(tmp, z - 1)
PlayMe(x, 2) = Right(tmp, 1)
Next x

Close #1
DoEvents
'Loop

End Sub
Sub AutomatePpt(PresPath As String)
Dim oPPTApp As Object
Dim oPPTPres As Object
'Dim Wn As SlideShowWindow
Dim Showpos As Integer
Dim iSlides, x, y, z As Integer
Dim tmp As String

On Error Resume Next

Set oPPTApp = CreateObject("PowerPoint.Application")
If Not oPPTApp Is Nothing Then
With oPPTApp
Do 'do until we break out of this loop
RunMe 'get files into array
'Play each PPT file that is marked
For y = 1 To 8
If UCase(PlayMe(y, 2)) = "Y" Then
PresPath = "f:\public\lobby\" & PlayMe(y, 1)
'Call AutomatePpt("f:\public\lobby\" & PlayMe(x, 1))
Set oPPTPres = .Presentations.Open(PresPath, True, , False)
If Not oPPTPres Is Nothing Then
oPPTPres.SlideShowSettings.LoopUntilStopped = False
oPPTPres.SlideShowSettings.Run
iSlides = oPPTPres.Slides.Count
'We need to pause for (iSlides * 5) seconds for the
display to run
Debug.Print Time$
Do While iSlides > 0
For x = 1 To 5 'wait 5 seconds, DoEvents each
second
Sleep (990) 'we are going to wait just 0.990
secs. per Sleep
DoEvents
Next x
iSlides = iSlides - 1
Loop
Debug.Print Time$
Else
MsgBox "The code could not open the specified file." & _
vbCr & Chr$(34) & PresPath & Chr$(34) & vbCr & _
"Check if the file is present at the location.", _
vbCritical + vbOKOnly, "PowerPoint Automation
Example"
Exit Sub
End If
End If
Set oPPTPres = .Presentations.Close
Set oPPTPres = Nothing
Next y
Loop
End With
Else
MsgBox "The code failed to instantiate PowerPoint session.", _
vbCritical + vbOKOnly, "PowerPoint Automation Example"
Exit Sub
End If
oPPTApp.Quit
DoEvents
Set oPPTApp = Nothing
'DoEvents
End Sub

---------End of msg.---------------
 

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