Expire slides

  • Thread starter Thread starter Elisha Dvi
  • Start date Start date
E

Elisha Dvi

I am running a presentation (which is broadcast on cables
TV system) in a loop all week long. It is a msg board and
every slide have its expiration time.
How can I attach some VBA code to a certain slide that
will cause it to expire on a certain time?
 
I dont' have a ready-made answer for you, just some ideas.

First, you'll need to do this with events; you'd trap the slide change
event in this case.

See
Make PPT respond to events
http://www.rdpslides.com/pptfaq/FAQ00004.htm

Now suppose you tag each slide with an expiration date:

ActivePresentation.Slides(42).Tags Add "EXP_DATE", DateString

Then when a slide change event takes you to a new slide, you'd look at the
slide(s) following it; for each slide, if .Slide.Tags("EXP_DATE") > today's
date, then delete it.

Alternatively, and probably simpler/more reliable:

Trap the slideshow start event and do something like this:

Dim x as long

For x = ActivePresentation.Slides.Count to 1 Step -1

' you'd need to add the necessary code for type conversion and grabbing
the date also
if ActivePresentation.Slides(x).Tags("EXP_DATE") > todays_date then
oSl.Hide ' or oSl.Delete
end if
Next x


--

Steve Rindsberg PPT MVP
PPTLive ( http://www.pptlive.com ) Featured Speaker
PPTools: http://www.pptools.com
PPT FAQ: http://www.pptfaq.com
 
Let me restate your question, to make sure I am understanding your question
correctly.

You have built a show that is running unattended in a loop.
Each slide in the show will have a time and date attached.
After that designated time and date, the slide will no longer be shown as
part of the loop.
Correct?

First thing you will have to do is install an event capture add-in. See:
http://www.rdpslides.com/pptfaq/FAQ00004.htm

Then you would have to have a way of storing the date/time.
This could be embedded in an object on the slide or a separate data file.
I'd recommend embedding it. It would be easiest to get to if it was
standard time/date formatted as the text for the slide title (you would want
to move it off of the visible part of the slide). But it could also be
hidden as a tag on any object on the slide. If you use an external data
file will have to use a reference to the slide that could not be mistaken
for another. Each of these methods has advantages, each has draw-backs.

Then, using VBA, whenever a slide changes (next slide event), it should
compare the expire date to the embedded date on that slide. If the slide is
expired, then it should change the slide to 'hidden' or delete the slide
completely.
See: http://www.rdpslides.com/pptfaq/FAQ00033.htm


Hope this gets you started,

B
 
Sorry, Steve, to step on your response. My news server lag time is
sometimes rather outrageous.

B
 
B said:
Sorry, Steve, to step on your response. My news server lag time is
sometimes rather outrageous.

Yo B. No need to apologize for that, EVER, 'kay?

As I'm sure you've noticed, sometimes it looks like a muddy day on the rugby
field, the way we stumble over one another answering questions.

Your way of explaining stuff might make the "click" that mine doesn't.
 
Steve Rindsberg said:
As I'm sure you've noticed, sometimes it looks like a muddy day on the rugby
field, the way we stumble over one another answering questions.

It's always a muddy day on a rugby field.
 
As I'm sure you've noticed, sometimes it looks like a muddy day on the
rugby

It's always a muddy day on a rugby field.

<g>

I think mud draws rugby players like fruit draws flies. No Corel jokes,
please.
 
Back
Top