If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
auto run macro with even handler?
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 |
#2
|
|||
|
|||
auto run macro with even handler?
In article , 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 he 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 ================================================ |
#3
|
|||
|
|||
auto run macro with even handler?
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 , 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 he 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 ================================================ |
#4
|
|||
|
|||
auto run macro with even handler?
In article , 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 , 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 he 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 ================================================ |
#5
|
|||
|
|||
auto run macro with even handler?
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 , 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 , 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 he 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 ================================================ |
#6
|
|||
|
|||
auto run macro with even handler?
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" wrote in message ... 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 |
#7
|
|||
|
|||
auto run macro with even handler?
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" wrote in message ... 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 |
#8
|
|||
|
|||
auto run macro with even handler?
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 |
#9
|
|||
|
|||
auto run macro with even handler?
In article , Theintern wrote:
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. That's about the it of it, yup. 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? Yes. Once it's activated try selecting something or opening a new presentation. First, make sure that the various subs aren't commented out ... I don't recall whether Shyam left all of them "live" or not. and by class, he means class module right? Yes. thanks scott "Steve Rindsberg" wrote: In article , 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 , 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 he 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 ================================================ ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
Thread Tools | |
Display Modes | |
|
|