BatchFile Posted March 11, 2010 Posted March 11, 2010 (edited) Question1: Is it possible to get a Powerpoint slide to fire off a Macro to open, or close, another program? Question2: How do you do it in VB in the Macro code? We have a presentation running all the time in reception / canteen and I'd like to be able to tell it to, for example, open a certain web page for a few seconds, then close it again and show the next slide. Possible? Edit: We've both 2003 and 2007 versions so either will do Edited March 11, 2010 by BatchFile
apeo Posted March 11, 2010 Posted March 11, 2010 I think you can launch an application (with a click for example, you can probably get it to launch after a certain time) but closing the application after a certain amount of time, I wouldnt say that would be easy to do.
BatchFile Posted March 11, 2010 Author Posted March 11, 2010 I found some "EndTask(process)" commands last night but couldn't get them to work in a VB Macro - I don't know much VB hence asking here
LosOjos Posted March 11, 2010 Posted March 11, 2010 This might start you off on the right tack: How can I get my code to run automatically when a presentation opens? Powerpoint doesn't publish slide events by default, though it is possible to get access to slide events, this FAQ has more info: Make your VBA code in PowerPoint respond to events EDIT: does the code need to automatically run, or is it possible to have it trigger when a user presses a button? I presumed it would need to be automatic, but if a button is a possibility, I may be able to help...
apeo Posted March 11, 2010 Posted March 11, 2010 I found some "EndTask(process)" commands last night but couldn't get them to work in a VB Macro - I don't know much VB hence asking here Do you have a link to where you read about it?
BatchFile Posted March 11, 2010 Author Posted March 11, 2010 Do you have a link to where you read about it? These were the ones that looked promising: Launch and terminate applications in Visual Basic 6.0 Visual Basic Frequently Asked Questions : How can I run another application or batch file from my Visual Basic .NET code?
BatchFile Posted March 11, 2010 Author Posted March 11, 2010 does the code need to automatically run, or is it possible to have it trigger when a user presses a button? I presumed it would need to be automatic, but if a button is a possibility, I may be able to help... It does need to be automatic - it just loops round all day
LosOjos Posted March 11, 2010 Posted March 11, 2010 It does need to be automatic - it just loops round all day You're going to need an add-in to achieve this, shouldn't be a big problem though just install it on the machine that runs the presentation. I'm snowed under at the minute but if I get some time later I'll have a go at putting something together for you 1
penfold Posted March 11, 2010 Posted March 11, 2010 You could try this add on? LiveWeb - insert and update web pages real-time in PowerPoint 1
penfold Posted March 11, 2010 Posted March 11, 2010 In addition to that, if it's for a information screen you might want to look at Xibo. It's free and we've just started using it here, and I'm quite impressed. There are others on here who have used it too. More info can be found here Xibo but you might want to give yourself a little time to have a look at it. 1
apeo Posted March 11, 2010 Posted March 11, 2010 (edited) It does need to be automatic - it just loops round all day Heres an addin you might want to look at: Create an ADD-IN with TOOLBARS that run macros I havent gone on the links you provided yet TonyRidal but it looks like they are VB guides.. note VB and VBA are different. EDIT: To launch an application you can use something like this: Dim LaunchApp As Variant LaunchApp = Shell("notepad.exe") This launches notepad, if you want to launch your app the just put in the full path (e.g. c:\dir\app.exe). Not sure how you can close the app after you lose focus though. Maybe using sendkeys? Edited March 11, 2010 by apeo 1
LosOjos Posted March 11, 2010 Posted March 11, 2010 You could try this add on? LiveWeb - insert and update web pages real-time in PowerPoint That's the best option in my opinion (if you want keep on using Powerpoint rather than Xibo). It is possible to launch a browser window and close it programatically, but it would be much tidier to do it with that add-in, plus it's then part of your slideshow so you time changes as you normally would with a slide
BatchFile Posted March 11, 2010 Author Posted March 11, 2010 Yeah, thanks all:D the add-ins seem to be the way to go - I'll update this to say how I got on when I've done it
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now