B
BothFeet
I am having trouble with PowerPoint application events. I would like
to create an add-in with an auto_open macro that will initialize an
event handler. Then, any time a user opens any other presentation, my
macros will run.
I have followed the examples here:
http://www.pptfaq.com/FAQ00004.htm
and I downloaded "Event Handler Demo in PowerPoint 2000+" from
http://skp.mvps.org/download.htm
The example does not work on my system.
I modified the code like this:
I have a class module named cEventClass:
Option Explicit
Public WithEvents PPTEvent As Application
Private Sub PPTEvent_NewPresentation(ByVal Pres As Presentation)
MsgBox "New presentation event"
End Sub
Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
MsgBox "Open presentation event"
End Sub
and a regular module with auto open:
Sub auto_open()
MsgBox "loading add in event handler"
Set cPPTObject.PPTEvent = Application
End Sub
I have tried it as both and add-in and just opening the presentation
and then trying to open another presentation. I can never get the
NewPresentation or PresentationOpen events to fire.
to create an add-in with an auto_open macro that will initialize an
event handler. Then, any time a user opens any other presentation, my
macros will run.
I have followed the examples here:
http://www.pptfaq.com/FAQ00004.htm
and I downloaded "Event Handler Demo in PowerPoint 2000+" from
http://skp.mvps.org/download.htm
The example does not work on my system.
I modified the code like this:
I have a class module named cEventClass:
Option Explicit
Public WithEvents PPTEvent As Application
Private Sub PPTEvent_NewPresentation(ByVal Pres As Presentation)
MsgBox "New presentation event"
End Sub
Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation)
MsgBox "Open presentation event"
End Sub
and a regular module with auto open:
Sub auto_open()
MsgBox "loading add in event handler"
Set cPPTObject.PPTEvent = Application
End Sub
I have tried it as both and add-in and just opening the presentation
and then trying to open another presentation. I can never get the
NewPresentation or PresentationOpen events to fire.