Looking for a simple way to play selected ppt files in sequence.

G

Guest

I have a need for a vb program that will replace an existing, broken
program we have here. (No source code can be found.)
What this program seems to do is help folks select which ppt files to play
in sequence so as to appear as one continuous presentation in our lobby. It
lets people from different departments check checkboxes to say which
department(s) want their whatever.ppt file to be part of the total
presentation.
It seems like this program puts out an ascii file based on which checkboxes
are marked, i.e., Welcome.ppt, ADMIN.ppt, Dept1.ppt, Dept2.ppt, etc. Then
some other program plays the files listed in this text file. Welcome.ppt
always plays; the others are included if their checkbox is checked. Well,
it's broken and there's no source code.
It's pretty simple, but I don't know how to use vb to talk to Powerpoint.
VB? Batch file? Sample files I can learn from? Is there a better way to do
this?
Any clues/help please?
 
S

Steve Rindsberg

Pcantele said:
I have a need for a vb program that will replace an existing, broken
program we have here. (No source code can be found.)
What this program seems to do is help folks select which ppt files to play
in sequence so as to appear as one continuous presentation in our lobby. It
lets people from different departments check checkboxes to say which
department(s) want their whatever.ppt file to be part of the total
presentation.
It seems like this program puts out an ascii file based on which checkboxes
are marked, i.e., Welcome.ppt, ADMIN.ppt, Dept1.ppt, Dept2.ppt, etc. Then
some other program plays the files listed in this text file. Welcome.ppt
always plays; the others are included if their checkbox is checked. Well,
it's broken and there's no source code.
It's pretty simple, but I don't know how to use vb to talk to Powerpoint.
VB? Batch file? Sample files I can learn from? Is there a better way to do
this?
Any clues/help please?

I'm guessing that the program broke when you upgraded to PPT 2002 or 2003?

You used to be able to hand PowerPoint a list of files to play in a simple text
file with a .LST extension. That's no longer supported, though it still is,
after a fashion, in the PowerPoint VIEWER.

So if you have a Show.LST file like:

ShowA.ppt
ShowB.ppt
ShowC.ppt

you could do this from the command line or a batch file:

"[full path to]\PPTView.EXE" /l "[full path to]\Show.LST"
 
G

Guest

Sorry, I should be clear as to what we have that broke.
Someone wrote a VB program 'lobby.exe' back in 2002 or so and since moved
on. This program writes out a text file that lists the eight or so ppt files
that could be played with a 'y' or 'n' next to them to indicate whether or
not they should play.
I'm just looking for something along those lines, or preferably, I'd like to
write something to replace the original program so the old ladies can keep
doing what they used to do.
I don't know how to tell powerpoint 2003 how to play a presentation from VB.
In the mean time, I'm finding other neat tips on the net; just not anything
that can help yet.


Steve Rindsberg said:
Pcantele said:
I have a need for a vb program that will replace an existing, broken
program we have here. (No source code can be found.)
What this program seems to do is help folks select which ppt files to play
in sequence so as to appear as one continuous presentation in our lobby. It
lets people from different departments check checkboxes to say which
department(s) want their whatever.ppt file to be part of the total
presentation.
It seems like this program puts out an ascii file based on which checkboxes
are marked, i.e., Welcome.ppt, ADMIN.ppt, Dept1.ppt, Dept2.ppt, etc. Then
some other program plays the files listed in this text file. Welcome.ppt
always plays; the others are included if their checkbox is checked. Well,
it's broken and there's no source code.
It's pretty simple, but I don't know how to use vb to talk to Powerpoint.
VB? Batch file? Sample files I can learn from? Is there a better way to do
this?
Any clues/help please?

I'm guessing that the program broke when you upgraded to PPT 2002 or 2003?

You used to be able to hand PowerPoint a list of files to play in a simple text
file with a .LST extension. That's no longer supported, though it still is,
after a fashion, in the PowerPoint VIEWER.

So if you have a Show.LST file like:

ShowA.ppt
ShowB.ppt
ShowC.ppt

you could do this from the command line or a batch file:

"[full path to]\PPTView.EXE" /l "[full path to]\Show.LST"


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
B

Bill Dilworth

There are 3 ways to go...

1) Commercial products like DataPoint. These are kinda pricey, but do what
you describe. They do offer a free add-in that may do what you want, check
out their stuff at http://www.presentationpoint.com/planpoint/index.aspx

2) Find someone to write a replacement EXE program for you. Not difficult,
but a little tricky. Cheaper and more customized to your needs, but more
likely to have a bug or two.

3) Learn VBA/VB6 enough to do the job yourself. This can be done for near
nothing, but will not yield a program quickly and will produce a number of
bugs until you work them out.

Which avenue are you interested in pursuing?

--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
yahoo2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..
 
G

Guest

Thanks, Bill;
More to this puzzle: There are TWO executables, one that creates the text
file and the second that reads the text file and runs powerpoint for the
selected presentations. The first executable is ok. I need to create a VB
program that will replace the second executable. OR, perhaps I could write
some code in VBA within Powerpoint that will read this text file and show
each of the presentations in order.
Now that I think about it, that would seem easier.
So I wish to write the vb/vba. I just don't know how to work with
Powerpoint from VB. Where do I find help/examples?
Thanks agian for the suggestions.
 
S

Steve Rindsberg

Thanks, Bill;
More to this puzzle: There are TWO executables, one that creates the text
file and the second that reads the text file and runs powerpoint for the
selected presentations. The first executable is ok. I need to create a VB
program that will replace the second executable. OR, perhaps I could write
some code in VBA within Powerpoint that will read this text file and show
each of the presentations in order.
Now that I think about it, that would seem easier.
So I wish to write the vb/vba. I just don't know how to work with
Powerpoint from VB. Where do I find help/examples?

Here's good. <g>

Let's start here: Post an example of the text file that Program B reads.
Just open it in notepad and paste it in.
 
G

Guest

Here is the text file that the first program puts out:

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

This shows that the two presentations, adm.ppt and fin.ppt, should play, one
after another, continuously.
Program B needs to read this in and play those presentations.
I'm thinking that Powerpoint code (vba) could read this file then runs those
presentations, so there would be no need for another external program.
Thoughts? Directions?
I was just at the bookstore today to get some ideas. I didn't find anything
that helped, though. :(
Thanks for responding.
 
S

Steve Rindsberg

Okeydoke. I've got this started off but I'm about to fall over here.
COMMUNITY PROJECT! Whoever's next in line, TAG. You're it.

It might be better to handle this as an autorun addin or even as an external VB .EXE
rather than trying to muck with PPT's slidewindows from a PPT slidewindow.

Let's leave it on the field and see who kicks it:


Option Explicit

Sub PlayTheShows()

' Create a dummy show with just one slide in it
' Add this macro to it
' Put a button on the first slide
' Set its action setting to Run Macro --> THIS macro

' Assumes we have a text file that looks like this:
'WelcomeSign.ppt;N
'adm.ppt;Y
'fin.ppt;Y
'rms.ppt;N
'ebs.ppt;N
'hmsr.ppt;N
'rps.ppt;N
'cmsrv.ppt;N

Dim sPPTPath As String
Dim sFileName As String
Dim iFileNum As Integer
Dim sBuf As String
Dim x As Long

Dim cPPTFiles As Collection
Set cPPTFiles = New Collection

' Edit the text between quotes to reflect the name of the
' text file on your system:
sFileName = "c:\temp\test.txt"

' Edit this to make it point to the path where your
' PPT files are all stored; be sure to add the
' traling backslash
sPPTPath = "c:\temp\"

' open file and read in the filenames
iFileNum = FreeFile()
Open sFileName For Input As #iFileNum
While Not EOF(iFileNum)
Line Input #iFileNum, sBuf
If sBuf <> "" Then
If InStr(UCase(sBuf), ";Y") > 0 Then
' it's a LIVE one, folks
' Make sure the file's there first
If Len(Dir$(sPPTPath & Mid$(sBuf, 1, InStr(sBuf, ";") - 1))) > 0
Then
' add it to our "showtime" collection
cPPTFiles.Add (sPPTPath & Mid$(sBuf, 1, InStr(sBuf, ";") - 1))
End If
End If
End If
Wend
Close #iFileNum

' let's see what we have so far:
For x = 1 To cPPTFiles.Count
Debug.Print cPPTFiles(x)
Next

' I've gotten it this far.
' We've got the presentations that are to be played (and only those) in a
collection
' This doesn't work worth a darn but it's a start and I'm about to fall asleep.
' Bill or somebody who's better at working with slide show windows
' will come to our rescue. Won't they? Please? ;-)
For x = 1 To cPPTFiles.Count
With Presentations.Open(cPPTFiles(x))
With .SlideShowSettings
.Run
On Error Resume Next
'While SlideShowWindows(1).View.State <> ppSlideShowDone
While SlideShowWindows.Count > 1
DoEvents
Wend
End With
.Close
End With
Next

End Sub
 
G

Guest

Bill,

I've downloaded the DataPoint product and I'm going to test it to see if it
meets my client's needs. Regarding your 2nd recommendation, to whom might I
go to have a custom program built? do you have recommendations?

Sandy
 

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