繁体   English   中英

Powerpoint时间每张幻灯片显示多长时间

[英]Powerpoint time how long each slide is displayed for

我正在做一个简报演示,我需要计时每张幻灯片显示多长时间到2个小数位(例如1.45秒),并且每次演示后都可以检索。 我猜最简单的方法是以某种方式使用VB计时器并将每个计时器存储为公共变量,但不知道如何启动。 我在使用Visual Basic方面经验有限。

任何帮助是极大的赞赏。

Powerpoint中存在此功能。

http://www.howtogeek.com/howto/34395/how-to-time-your-powerpoint-slides-for-more-effective-presentations/

编辑。 为了获得更精确的时间:每次更改幻灯片时,此示例都会在消息框中显示时间。

Public Declare Function GetTickCount Lib "kernel32.dll" () As Long
Public startTime As Long

Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow)
    If SSW.View.CurrentShowPosition = 1 Then
        startTime = GetTickCount()
    Else
        MsgBox GetTickCount() - startTime
    End If
End Sub

而不是消息框,请将其放在文件或其他内容中。

Public Declare Function GetTickCount Lib "kernel32.dll" () As Long

Public startTime As Long
Public strPath As String

Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow)
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    strPath = "timing.txt"
    Dim fs, f

    If SSW.View.CurrentShowPosition = 1 Then
        startTime = GetTickCount()

        Set fs = CreateObject("Scripting.FileSystemObject")
        Set f = fs.CreateTextFile("d:\testfile.txt", True)
        f.WriteLine "Started new presentation"
        f.Close
    Else
        Dim DeltaTime As Long
        DeltaTime = GetTickCount() - startTime

        Set fs = CreateObject("Scripting.FileSystemObject")
        Set f = fs.OpenTextFile("d:\testfile.txt", ForAppending, TristateFalse)

        f.Write "time in milliseconds since start: "
        f.WriteLine Str(DeltaTime)
        f.Close
    End If
End Sub

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM