Jump to content

Recommended Posts

Posted (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 by BatchFile
Posted
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.
Posted

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...

Posted
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?

Posted

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 :(

Posted
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

  • Thanks 1
Posted
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.
  • Thanks 1
Posted (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 by apeo
  • Thanks 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...