S
skirchdo
I have a presentation which uses a master slide which will pull an
outline txt file to automatically create numerous slides. This outline
txt file is updated constantly from an database which ports its data
into this txt file. The txt file length is constantly changing which
means the number of slide being generated when powerpoint "inserts
slides from outline" will also change. One time there may be 50 slides
then the next time it might be 68 then next time 103, etc. It's
basically unknown how many slides there will be each time.
So what I need is a macro that will "select all" of the slides, delete
them (not the master of course), then insert the txt from the external
file using the "Slides from Outline" function.
Next I have tried to utilize the OfficeOnce Event Generator to run the
macro again upon the end of the slide. This in effect is supposed to
refreshes the slides at the end of the slideshow (e.g deleting them
then re-inserting the outline data as a whole new set of slides).
I can get the initital macro to highlight all of the slides and then
delete (well maybe not delete) them and insert the outline source data
which creates the individual slides, but when the Event Generator runs
the macro again, it doesn't delete the original slides but it appends
the new outline data to the old slides which doubles them...this
happens each time adding more and more slides each time.
So first of all, why is the macro deleting all of the slides the first
time it's run, but not when it's run from the end of slide macro?
And finally, once I get this part above to work, I need to re-run the
slide show once the data is refreshed.
This needs to all work automatically once it's started the first time.
It needs to be an infinite loop until someone manually ends the
slideshow, all the while updating the slides after each slideshow.
This is basically a hotel event calendar that is pumped to TV screens
throughout a hotel/conference center. The slide outline data is the
conference center events data (Groups, Times, Rooms, Etc).
We are trying to get Powerpoint to do this because of the cost of
buying a proprietary system built specifically for this function. I
feel I'm really close to getting this done but I'm hitting these
hurdles which are beyond my powerpoint macro building abilities. Can
someone helpd me please?
Here are my two macros which work independantly but not together.
Sub RefreshData()
ActiveWindow.Selection.SlideRange.Delete
ActivePresentation.Slides.InsertFromFile FileName:="D:\Documents
and Settings\550490\My Documents\EVENTS.TXT", Index:=0
With ActivePresentation.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
.Run
End With
SlideShowWindows(Index:=1).View.First
End Sub
Sub OnSlideShowEnd()
Application.Run "'ABCDEFG.ppt'!RefreshData"
SlideShowWindows(Index:=1).View.First
End Sub
Any help would be greatly appreciated.
outline txt file to automatically create numerous slides. This outline
txt file is updated constantly from an database which ports its data
into this txt file. The txt file length is constantly changing which
means the number of slide being generated when powerpoint "inserts
slides from outline" will also change. One time there may be 50 slides
then the next time it might be 68 then next time 103, etc. It's
basically unknown how many slides there will be each time.
So what I need is a macro that will "select all" of the slides, delete
them (not the master of course), then insert the txt from the external
file using the "Slides from Outline" function.
Next I have tried to utilize the OfficeOnce Event Generator to run the
macro again upon the end of the slide. This in effect is supposed to
refreshes the slides at the end of the slideshow (e.g deleting them
then re-inserting the outline data as a whole new set of slides).
I can get the initital macro to highlight all of the slides and then
delete (well maybe not delete) them and insert the outline source data
which creates the individual slides, but when the Event Generator runs
the macro again, it doesn't delete the original slides but it appends
the new outline data to the old slides which doubles them...this
happens each time adding more and more slides each time.
So first of all, why is the macro deleting all of the slides the first
time it's run, but not when it's run from the end of slide macro?
And finally, once I get this part above to work, I need to re-run the
slide show once the data is refreshed.
This needs to all work automatically once it's started the first time.
It needs to be an infinite loop until someone manually ends the
slideshow, all the while updating the slides after each slideshow.
This is basically a hotel event calendar that is pumped to TV screens
throughout a hotel/conference center. The slide outline data is the
conference center events data (Groups, Times, Rooms, Etc).
We are trying to get Powerpoint to do this because of the cost of
buying a proprietary system built specifically for this function. I
feel I'm really close to getting this done but I'm hitting these
hurdles which are beyond my powerpoint macro building abilities. Can
someone helpd me please?
Here are my two macros which work independantly but not together.
Sub RefreshData()
ActiveWindow.Selection.SlideRange.Delete
ActivePresentation.Slides.InsertFromFile FileName:="D:\Documents
and Settings\550490\My Documents\EVENTS.TXT", Index:=0
With ActivePresentation.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
.Run
End With
SlideShowWindows(Index:=1).View.First
End Sub
Sub OnSlideShowEnd()
Application.Run "'ABCDEFG.ppt'!RefreshData"
SlideShowWindows(Index:=1).View.First
End Sub
Any help would be greatly appreciated.