PC Review


Reply
Thread Tools Rate Thread

auto run macro with even handler?

 
 
theintern
Guest
Posts: n/a
 
      9th Jul 2008
I know, I know, you can't auto run anything from powerpoint...easily. So i
created a macro with a Sub Auto_Open, but when i open the slideshow, nothing
happens. it's supposed to add pictures to the show. is it possible it's
trying to do this before the slides are even loaded all the way, so nothing
is showing up? if i click on the icon for add-in after it's loaded, it works
great. I've also been reading about event handlers, but really don't know
what they are. if someone can just tell me what to type in to get this thing
to fire that'd be great. Even if it's after an intro slide or something. it
just has to be automatic. no clicking, etc...I'm on PowerPoint 2007.

thanks
scott
 
Reply With Quote
 
 
 
 
theintern
Guest
Posts: n/a
 
      9th Jul 2008
So the Auto_Open add-in macro thing is supposed to run the EventHandler? so
does all my code of what i want it to do (insert object, display, etc.) go in
the EventHandler? if so, how do i call that from the Auto_Open macro?

thanks
scott

"Steve Rindsberg" wrote:

> In article <07EC9268-8D52-4672-A832-(E-Mail Removed)>, Theintern
> wrote:
> > I know, I know, you can't auto run anything from powerpoint...easily. So i
> > created a macro with a Sub Auto_Open, but when i open the slideshow, nothing
> > happens.

>
> Right. As you say, you can't auto run anything. Easily. ;-)
> Auto_Open subs only run when in an add-in, and then only when the add-in loads.
>
>
> > it's supposed to add pictures to the show. is it possible it's
> > trying to do this before the slides are even loaded all the way, so nothing
> > is showing up? if i click on the icon for add-in after it's loaded, it works
> > great. I've also been reading about event handlers, but really don't know
> > what they are.

>
> PowerPoint fires "events" when certain things happen.
>
> You can interpose code that "traps" these events (ie, notices them and
> optionally does something in response). That's your event handler.
>
> Start here:
>
> Make PPT respond to events
> http://www.pptfaq.com/FAQ00004.htm
>
> You'll probably want to experiment with the PresentationOpen and SlideShowBegin
> events.
>
> And for the handler to load w/o any user clicks, you'll have to have it in an
> add-in, which then means that the add-in must be loaded on the computer where
> this has to work. If it's a kiosk or some other PC that you have control over,
> no problem. If you're distributing it to others, a different approach to the
> problem is in order, I expect.
>
> if someone can just tell me what to type in to get this thing
> > to fire that'd be great. Even if it's after an intro slide or something. it
> > just has to be automatic. no clicking, etc...I'm on PowerPoint 2007.
> >
> > thanks
> > scott
> >

>
> -----------------------------------------
> Steve Rindsberg, PPT MVP
> PPT FAQ: www.pptfaq.com
> PPTools: www.pptools.com
> ================================================
>
>
>

 
Reply With Quote
 
theintern
Guest
Posts: n/a
 
      10th Jul 2008
k, that makes sense. so the Auto_Open acts as a switch to activate the Event
Handler to begin looking for a designated specific event. And when that
event happens it launches the other subs in the same module? I'm having a
little trouble creating the handler. i'm at
http://www.pptfaq.com/FAQ00004.htm and i get lost at step 5 with the demo.
what is it doing? i click on the button and it says it's activated and then
does nothing. i'm a little confused what i'm supposed to be getting from
that. those are the right steps to create the handler though? and by class,
he means class module right?

thanks
scott

"Steve Rindsberg" wrote:

> In article <40B25EF0-CF46-4CF1-88E2-(E-Mail Removed)>, Theintern wrote:
> > So the Auto_Open add-in macro thing is supposed to run the EventHandler?

>
> Right .. the Auto_Open sub in the add-in initializes the event handler.
>
> From then on, when any event fires, it triggers a subroutine in the event handler
> code. You'll want to leave most of them commented out.
>
> For the events you want to trap, you'd either insert the code in the handler or,
> more practically, have the handler call another subroutine or function that does
> what you want.
>
>
> so
> > does all my code of what i want it to do (insert object, display, etc.) go in
> > the EventHandler? if so, how do i call that from the Auto_Open macro?
> >
> > thanks
> > scott
> >
> > "Steve Rindsberg" wrote:
> >
> > > In article <07EC9268-8D52-4672-A832-(E-Mail Removed)>, Theintern
> > > wrote:
> > > > I know, I know, you can't auto run anything from powerpoint...easily. So i
> > > > created a macro with a Sub Auto_Open, but when i open the slideshow, nothing
> > > > happens.
> > >
> > > Right. As you say, you can't auto run anything. Easily. ;-)
> > > Auto_Open subs only run when in an add-in, and then only when the add-in loads.
> > >
> > >
> > > > it's supposed to add pictures to the show. is it possible it's
> > > > trying to do this before the slides are even loaded all the way, so nothing
> > > > is showing up? if i click on the icon for add-in after it's loaded, it works
> > > > great. I've also been reading about event handlers, but really don't know
> > > > what they are.
> > >
> > > PowerPoint fires "events" when certain things happen.
> > >
> > > You can interpose code that "traps" these events (ie, notices them and
> > > optionally does something in response). That's your event handler.
> > >
> > > Start here:
> > >
> > > Make PPT respond to events
> > > http://www.pptfaq.com/FAQ00004.htm
> > >
> > > You'll probably want to experiment with the PresentationOpen and SlideShowBegin
> > > events.
> > >
> > > And for the handler to load w/o any user clicks, you'll have to have it in an
> > > add-in, which then means that the add-in must be loaded on the computer where
> > > this has to work. If it's a kiosk or some other PC that you have control over,
> > > no problem. If you're distributing it to others, a different approach to the
> > > problem is in order, I expect.
> > >
> > > if someone can just tell me what to type in to get this thing
> > > > to fire that'd be great. Even if it's after an intro slide or something. it
> > > > just has to be automatic. no clicking, etc...I'm on PowerPoint 2007.
> > > >
> > > > thanks
> > > > scott
> > > >
> > >
> > > -----------------------------------------
> > > Steve Rindsberg, PPT MVP
> > > PPT FAQ: www.pptfaq.com
> > > PPTools: www.pptools.com
> > > ================================================
> > >
> > >
> > >

> >

>
> -----------------------------------------
> Steve Rindsberg, PPT MVP
> PPT FAQ: www.pptfaq.com
> PPTools: www.pptools.com
> ================================================
>
>
>

 
Reply With Quote
 
Chirag
Guest
Posts: n/a
 
      10th Jul 2008
Look at the following:
Run VBA macro at a particular slide
http://officeone.mvps.org/vba/run_macro_at_slide.html

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"theintern" <(E-Mail Removed)> wrote in message
news:07EC9268-8D52-4672-A832-(E-Mail Removed)...
>I know, I know, you can't auto run anything from powerpoint...easily. So i
> created a macro with a Sub Auto_Open, but when i open the slideshow,
> nothing
> happens. it's supposed to add pictures to the show. is it possible it's
> trying to do this before the slides are even loaded all the way, so
> nothing
> is showing up? if i click on the icon for add-in after it's loaded, it
> works
> great. I've also been reading about event handlers, but really don't know
> what they are. if someone can just tell me what to type in to get this
> thing
> to fire that'd be great. Even if it's after an intro slide or something.
> it
> just has to be automatic. no clicking, etc...I'm on PowerPoint 2007.
>
> thanks
> scott


 
Reply With Quote
 
theintern
Guest
Posts: n/a
 
      10th Jul 2008
thanks for the idea. the problem is that i need the macro to run whenever
the application is opened, on it's own. which means i have to use add-ins
and handlers and it gets more complicated than i think that website has on
it. unless i'm missing something...



"Chirag" wrote:

> Look at the following:
> Run VBA macro at a particular slide
> http://officeone.mvps.org/vba/run_macro_at_slide.html
>
> - Chirag
>
> PowerShow - View multiple PowerPoint slide shows simultaneously
> http://officeone.mvps.org/powershow/powershow.html
>
> "theintern" <(E-Mail Removed)> wrote in message
> news:07EC9268-8D52-4672-A832-(E-Mail Removed)...
> >I know, I know, you can't auto run anything from powerpoint...easily. So i
> > created a macro with a Sub Auto_Open, but when i open the slideshow,
> > nothing
> > happens. it's supposed to add pictures to the show. is it possible it's
> > trying to do this before the slides are even loaded all the way, so
> > nothing
> > is showing up? if i click on the icon for add-in after it's loaded, it
> > works
> > great. I've also been reading about event handlers, but really don't know
> > what they are. if someone can just tell me what to type in to get this
> > thing
> > to fire that'd be great. Even if it's after an intro slide or something.
> > it
> > just has to be automatic. no clicking, etc...I'm on PowerPoint 2007.
> >
> > thanks
> > scott

>
>

 
Reply With Quote
 
theintern
Guest
Posts: n/a
 
      10th Jul 2008
Got it! I'm so happy! Here is the website which pretty much put it all
together for me.

http://www.vbaexpress.com/kb/getarticle.php?kb_id=327

Thanks!
scott

"theintern" wrote:

> I know, I know, you can't auto run anything from powerpoint...easily. So i
> created a macro with a Sub Auto_Open, but when i open the slideshow, nothing
> happens. it's supposed to add pictures to the show. is it possible it's
> trying to do this before the slides are even loaded all the way, so nothing
> is showing up? if i click on the icon for add-in after it's loaded, it works
> great. I've also been reading about event handlers, but really don't know
> what they are. if someone can just tell me what to type in to get this thing
> to fire that'd be great. Even if it's after an intro slide or something. it
> just has to be automatic. no clicking, etc...I'm on PowerPoint 2007.
>
> thanks
> scott

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error handler that does not end macro =?Utf-8?B?QXJuZSBIZWdlZm9ycw==?= Microsoft Excel Programming 1 18th Aug 2006 01:51 PM
Auto-run macro after auto-query refresh (Excel2000,sr1) =?Utf-8?B?QmlsbCBDdWZmbGlu?= Microsoft Excel Programming 3 29th Jun 2006 03:30 AM
error handler in macro? Don Microsoft Excel Programming 2 6th Oct 2004 05:00 PM
Spam handler VB macro GB Microsoft Outlook VBA Programming 4 7th Jan 2004 10:14 AM
Create new event handler or override existing handler? =?Utf-8?B?V29vbiBLaWF0?= Microsoft Dot NET Framework Forms 1 5th Jan 2004 08:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:16 PM.