I have the following VBA code attached in a PowerPoint 2010 macro-enabled presentation:
Public CurrentSlideIndex As Integer
Sub OnSlideShowPageChange()
CurrentSlideIndex = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
If CurrentSlideIndex = 1 Then
MsgBox "First Page"
' some initialization
End If
End Sub
I want to do some initialization there when the first page is shown. The problem is that when I run the presentation for the first time, the routine is not fired. I need to stop the presentation and run it a second time, then it works, and keeps working afterward also. Only the first run doesn't work.
Is there a fix for that?