autorunning macros

G

GeorgeAtkins

PPT 2003.
Macros seem to be a different animal in PPT than in Excel, Access, etc. For
example:

1. How do I create an "autorun" macro? Online helped infers that I need to
create a Application object in a class module, then initialize it so that
events can run:
Dim X As New EventClassModule
Sub InitializeApp()
Set X.App = Application
End Sub

Ok. If I MANUALLY run this procedure, I can get my event procedures to fire.
But how do I get the initializeApp routine to AUTOMATICALLY run? It seems
rather silly to have to manually run a macro so that event macros can run!!
Am I missing something here?

All I want to do is run a procedure for both the slideshowbegin and
slideshowend events without manual interaction.

Thanks!

George
 
G

GeorgeAtkins

As I tried to infer from my message, I did follow the steps of that KB
article. The question that I have is: How to I initiate the initialization
macro automatically? I'm speaking of:
Dim X As New EventClassModule
Sub InitializeApp()
Set X.App = Application
End Sub

Which the note says I need to run to make the events work. I have to have
this macro run automatically, to initialize the event class module, so I
understand from the article. Obviously, I must be misunderstanding something.
I have a PPT with an event class module, event modules and the initialization
macro to activate the events. What runs the initialization macro?

George
 
D

David M. Marcovitz

Sorry, I thought you were referring to having read a Microsoft Help file,
not the PPT FAQ (which is not the same as the Microsoft Knowledge Base).
The entry in the PPT FAQ states:

An Event handler cannot be set automatically. To set an event handler
when PowerPoint starts up you still need to rely on the Auto_Open macro
of an add-in to instantiate the event handler.

Perhaps, Steve and/or Shyam can shed some more light on this as they are
more expert in this area than I.

--David

--
David M. Marcovitz
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
G

GeorgeAtkins

Thanks for the reply. I can't believe that the VBA implementation in PPT is
still so immature that it cannot support inherent auto-macros, like Excel,
Word and Access. This is especially galling, considering the ability to
create "stand-alone" PPS slide shows, for example. Well, I'm not telling you
anything you don't know, of course.

George
 
G

GeorgeAtkins

Thanks for the links, Steve. I'll check them out.

However, I'll stand by my opinion: Having to create an add-in in order to
to fire an Auto-Run macro that is necessary to run an initialization macro in
order to allow PowerPoint to respond to event macros seems like the king of
kludges to me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top