本文介绍了打开一个pps文件并停止执行,直到演出结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个access(2007)应用程序,该应用程序生成ppt并将其保存为slideshow(pps).
该工具打开pps节目供用户查看,并且必须等到用户完成观看节目后.
我的问题是如何使访问(vba代码)等到节目结束?
就像我需要捕获ppt show的关闭事件一样.

在此先感谢

问候,
Naresh S.

Hi all,

I have an access(2007) application which generates and saves a ppt as slideshow(pps).
The tool opens the pps show for user review and has to wait until user completes viewing the show.
My problem here is how to make access(vba code) to wait until the show is closed?
Like I need to capture the closing event of the ppt show.

Thanks in advance

Regards,
Naresh S.

推荐答案

Option Compare Database
Option Explicit

Private Sub Form_Load()
    Me.TimerInterval = 1000
End Sub

'here is the procedure where you can check if pps is opened
Private Sub Form_Timer()
'in the example we are showing only actual time ;)
    Me.Label1.Caption = Now
    Me.Repaint
End Sub 


Set objppShowWindow = objPre.SlideShowSettings.Run.View
            On Error Resume Next
            Do Until objppShowWindow.State = ppSlideShowDone
                If Err.Number <> 0 Then
                    Exit Do
                Else
                    Sleep (1000) ''''Wait for 1 second
                End If
            Loop



这解决了我的问题



This solved my issue


这篇关于打开一个pps文件并停止执行,直到演出结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 07:32