Subroutine call when loading a specific slide or timer

I am working with a PowerPoint 2003 presentation to display a kiosk, and it works almost 24/7. In one slide there is weather, current date and forecast for 7 days.

I have already written subtitles that will update the weather from an Excel workbook and update the displayed dates, but now I have to manually update it when I enter. Is there a way I can have a subroutine (like UpdateSlide() ) when the slideshow reaches that particular slide? There seems to be no official way to do this, I suppose for security reasons, but what about an event over time, so that he says it every six hours?

+4
source share
2 answers

Use the OnSlideShowPageChange built-in event:

 Public Sub OnSlideShowPageChange(ByVal Wn As SlideShowWindow) If Wn.View.CurrentShowPosition = 3 Then 'Perform Updates for slide #3 EndIf End Sub 

Edit: As kcoppock pointed out, you can put this code in any module.

+8
source

The SlideShowNextSlide event is what you need. See How to write a PowerPoint slide change to a file? for an example of how to use it.

0
source

Source: https://habr.com/ru/post/1315071/


All Articles