PDA

View Full Version : Track navigation in Powerpoint (2013/2016)



mcinvalek
11-22-2016, 09:52 PM
I want to track a user of a powerpoint 2013 (x86) deck that I have created. Oh, im new to VBA programming and so my code is not very sophisticated. So far, I have created a mechanism that will write out to file: username, time, slide number. I need to have this running and "If I <> 1 Then ..." Or should I wrap the whole thing in a for each. I want this code to run all of the time and also append the data each time a person clicks on a different slide. One last print on close of the ppt file would be great too. Any suggestions would be most appreciated.


Sub Prnt()
Dim i As Integer, istring As String
i = ActiveWindow.Selection.SlideRange.SlideIndex
istring = Str(i)
Open "TESTFILE.txt" For Output As #1 ' Open file for output.
Write #1, Environ("username") & "," & Format(Now, "MM/dd/yyyy h:mm:ss") & "," & istring

'If i <> 1 Then Exit Sub

End Sub

John Wilson
11-23-2016, 11:52 PM
Do you want this to run in edit view or while the user is watching a slide show? The first is very difficult, the second less so.