Microsoft 製品に組み込まれている Visual Basic の実装。
シャロームさん
回答ありがとうございます。
1秒待つというヒントを得て、次の様にしたらエラーが出なくなりました。
CloseとQuitが発生してしまうとエラーが出てしまいますが、終了してくれれば要件は満たしているので問題解決です。
ほんとうにありがとうございました。
#If VBA7 Then
Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As LongPtr)
#Else
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#End If
Option Explicit
Dim SlideCount As Integer
Dim CurrentSlide As Integer
Sub StartButton()
SlideCount = ActivePresentation.Slides.Count
ActivePresentation.SlideShowWindow.View.Next
End Sub
Sub OnSlideShowPageChange(ByVal ss As SlideShowWindow)
CurrentSlide = ss.View.CurrentShowPosition
If CurrentSlide = SlideCount Then
Sleep 1000
'ActivePresentation.Close 'coment out
Application.Quit
End If
End Sub