Ok, so here is what you need to do. Please note one important point: PPS does not include the macro start method when opening PPS. If you want this functionality, create an add-in (ppa).
For PPS, create a module and class. (If you do not know how to do this, you may have to study the object model before continuing.) The module can be called anything. Name the class " clsWriteToFile ". In clsWriteToFile, enter the following:
Public WithEvents PPTEvent As Application 'this is at the top of the class Private Sub PPTEvent_SlideShowNextSlide(ByVal Wn As SlideShowWindow) 'MsgBox ActivePresentation.Slides.Item(1).SlideNumber 'This is meant to illustrate that it is here you will write what you need to the file, 'like a slide number or time stamp, etc. End Sub
In the module, put the following:
Public newPPTEvents As New clsWriteToFile Sub StartLogging() Set newPPTEvents.PPTEvent = Application 'this would be the location you either create the file or open an existing one. End Sub
You will need to write code to read / write from the file. FileSystemObject is useful in this regard.
For this to work with PPS without logging into VBA, you will have to have a manual trigger on the slide itself. An example would be adding a shape to the first slide, such as a rounded rectangle. Add it and enter "Start impression". Then add Action . The action will be on Mouse_Click "->" Run Macro ", and then select the StartLogging routine.
What is it.
If you use PPA instead of PPS, you can remove the need for the last step by simply naming the routine " StartLogging " with " Auto_Open ".
source share