I'd post the relevant code here as a start.
in module 1:
Option Explicit
' Sample demo of auto macros supported by the AutoEvents add-in for
PowerPoint 2000.
'[some procedures have been deleted]
'[the first two fire as expected]
Sub Auto_open()
MsgBox "You just opened the presentation."
End Sub
Sub Auto_Close()
MsgBox "You are closing the presentation."
End Sub
'[this one doesn't]
Sub Auto_Print()
MsgBox "You are about to print"
End Sub
in module 2:
Sub _
Auto_open()
Debug.Print " This is the second one"
End Sub
in Class Modules, clsCBEvents
Public WithEvents colCBars As Office.CommandBars
Public WithEvents CtrlHandler As Master
Private Sub colCBars_OnUpdate()
Static PreCopy As Integer
Dim MacroName As String
Dim PresName As String
Select Case PreCopy
Case Is > Presentations.Count
PreCopy = Presentations.Count
If PreCopy = 0 Then Exit Sub
Case Is < Presentations.Count
PreCopy = Presentations.Count
If PreCopy = 0 Then Exit Sub
If fnThisVBComponent(Presentations(PreCopy), "Auto_Open") <> ""
Then
MsgBox "You have a autoopen macro in ur document. Do you wish
to execute?", vbYesNo + vbQuestion, "Run Auto Open"
MacroName = Presentations(PreCopy).Name & "!" &
fnThisVBComponent(Presentations(PreCopy), "Auto_Open") & ".Auto_Open"
Application.Run MacroName
End If
Case Is = Presentations.Count
PreCopy = Presentations.Count
If PreCopy = 0 Then Exit Sub
If PreCopy = 1 Then
End If
End Select
End Sub
Function fnThisVBComponent(oBk As Presentation, sUniqueString As
String) As String
Dim oVBC As VBComponent
'Loop through the VBComponents in the given workbook's VBProject
For Each oVBC In oBk.VBProject.VBComponents
'Using it's code module
With oVBC.CodeModule
'See if we can find the unique string
If .Find(sUniqueString, 1, 1, .CountOfLines, 1000, True, True,
False) Then
'Found it, so return the VBComponent where it was found
Debug.Print oVBC.Name
If oVBC.Type = vbext_ct_StdModule Then
fnThisVBComponent = oVBC.Name
Exit For
End If
End If
End With
Next
End Function
__________ Information from ESET Smart Security, version of virus
signature database 5002 (20100405) __________
The message was checked by ESET Smart Security.
http://www.eset.com