Change Presentation on the fly

G

Guest

I have a presentation running on waiting room displays in several offices.
The .ppt file sits on a server in our data center. When I update the .ppt I
have to go to each office, close the presentation and reload the new .ppt and
start the show.

I would like to have the presentation check to see if the file has been
updated after each loop of the show, if it has the new presentation should be
loaded and the slide show started.

I've done this sort of thing in the past using batch files and the like but
I need code in PowerPoint (2003) to test for the updated file.

Any Ideas? Code?

Thanks again...

ggg
 
S

Steve Rindsberg

Gregg Church said:
I have a presentation running on waiting room displays in several offices.
The .ppt file sits on a server in our data center. When I update the .ppt I
have to go to each office, close the presentation and reload the new .ppt and
start the show.

I would like to have the presentation check to see if the file has been
updated after each loop of the show, if it has the new presentation should be
loaded and the slide show started.

I've done this sort of thing in the past using batch files and the like but
I need code in PowerPoint (2003) to test for the updated file.

Have a look here for a product that does this already:

http://www.presentationpoint.com/software/datapoint/
 
G

Guest

I looked at this but chose your merge product as a better fit for us as our
data changes only once a week and there is still some minor tweaking to get
the show right.

I am sure that there is a way from within vba to test for the existence of a
flag file that lets each location know that the presentation has changed. It
can then load the new presentation delete the flag file and start the show.

I'm just looking for a snipet or function that someone already has that I
can modify for my puposes.

Also my boss is highly frugal (read cheap) so I am very proud of the sales
job I did to get him to pay for Merge. (Come to think of it he hasn't
reimbursed me yet...) Anyway he won't spring for datapoint.

Thanks!

ggg
 
S

Steve Rindsberg

I looked at this but chose your merge product as a better fit for us as our
data changes only once a week and there is still some minor tweaking to get
the show right.

Well said:
I am sure that there is a way from within vba to test for the existence of a
flag file that lets each location know that the presentation has changed. It
can then load the new presentation delete the flag file and start the show.

I'm just looking for a snipet or function that someone already has that I
can modify for my puposes.

The quick and dirty way:

Dim sTestPath as String

' what file are we testing for?
sTestPath = "C:\Temp\SomeFile.PPT"

If Len(Dir$(sTestPath)) > 0 Then
MsgBox "Found it, boss"
Else
MsgBox "Nope, it's out to lunch"
End If

But consider this from Karl Peterson:

Dir is really frowned upon in the ClassicVB world, for "exists" tests. Lots
of potential pitfalls. Here's a method that avoids all of those...

Public Function FileExists(ByVal FileName As String) As Boolean
Dim nAttr As Long
' Grab this files attributes, and make sure it isn't a folder.
' This test includes cases where file doesn't exist at all.
On Error GoTo NoFile
nAttr = GetAttr(FileName)
If (nAttr And vbDirectory) <> vbDirectory Then
FileExists = True
End If
NoFile:
End Function

Public Function FolderExists(ByVal PathName As String) As Boolean
Dim nAttr As Long
' Grab the attributes, test valid values for folder bit.
On Error GoTo NoFolder
nAttr = GetAttr(PathName)
If (nAttr And vbDirectory) = vbDirectory Then
FolderExists = True
End If
NoFolder:
End Function

Also my boss is highly frugal (read cheap) so I am very proud of the sales
job I did to get him to pay for Merge.

My worn-out shoes thank you. My hungry cats yowl their gratitude. <g>

(Come to think of it he hasn't
 
G

Guest

Merge works well by the way. A few more error traps might be helpful. For
instance if you have an excel column named PIC:LAPhoto and another column
named Photo it locks PowerPoint up. Once I figured that out it worked like a
dream.

I appreciate the code below. Is it possible to 1.) Run code only after every
completed pass of a looping show? 2.) To programatically reload the show if
the flag file is there? and 3.) Delete the flag file? (not necessarily in
that order).

Thanks,

ggg
 
S

Steve Rindsberg

Merge works well by the way. A few more error traps might be helpful. For
instance if you have an excel column named PIC:LAPhoto and another column
named Photo it locks PowerPoint up. Once I figured that out it worked like a
dream.

We do warn against doing that ,-)

The next version will be a little stricter. Making the field names unique will no
longer be a suggestion; it'll be a requirement. We have ways of making you guys
behave, heh heh heh ...
I appreciate the code below. Is it possible to 1.) Run code only after every
completed pass of a looping show? 2.) To programatically reload the show if
the flag file is there? and 3.) Delete the flag file? (not necessarily in
that order).

That's where it starts to get tricky. You'd need to write an event handler, include it
in an add-in; once you can trap slide changes, you can work out whether you're on the
last slide and do the rest. I don't know that I've seen any code samples for this
around ... it's a bit specialized.
 

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