加载特定幻灯片或在计时器上时调用子例程 [英] Call subroutine when a specific slide loads, or on a timer

查看:104
本文介绍了加载特定幻灯片或在计时器上时调用子例程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PowerPoint 2003演示文稿进行信息亭显示,并且它几乎每天24/7运行。幻灯片上有天气,当前日期和7天预报。

I'm working with a PowerPoint 2003 presentation for a kiosk display, and it is left running pretty much 24/7. One slide on it has the weather, the current date, and the 7 day forecast.

我已经编写了可从Excel工作簿中更新天气并更新显示日期的子程序,但是现在我必须在到达时手动对其进行更新。在幻灯片放映到特定幻灯片时,是否可以调用子例程(例如 UpdateSlide())?出于安全考虑,我认为似乎没有官方方法可以执行此操作,但是定时事件如何处理呢?比如说每六个小时一次?

I've already written the subs that will update the weather from an Excel workbook, and update the dates displayed, but right now I have to manually update it when I come in. Is there a way that I can have a subroutine (e.g. UpdateSlide()) called when the slideshow reaches that particular slide? It seems like there is no official way to do this, I'm assuming for security reasons, but what about a timed event, such that it would call it say, every six hours?

推荐答案

使用内置的 OnSlideShowPageChange 事件:

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

编辑:正如kcoppock指出的那样,您可以将此代码放在任何模块中。

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

这篇关于加载特定幻灯片或在计时器上时调用子例程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆