+ Post New Thread
Results 1 to 13 of 13
How do you do....it? Thread, Macro on powerpoint slide in Technical; Question1: Is it possible to get a Powerpoint slide to fire off a Macro to open, or close, another program? ...
  1. #1
    BatchFile's Avatar
    Join Date
    Aug 2007
    Location
    Cumbria
    Posts
    948
    Thank Post
    544
    Thanked 128 Times in 106 Posts
    Rep Power
    60

    Macro on powerpoint slide

    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
    Last edited by BatchFile; 11th March 2010 at 08:15 AM.

  2. #2
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42
    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.

  3. #3
    BatchFile's Avatar
    Join Date
    Aug 2007
    Location
    Cumbria
    Posts
    948
    Thank Post
    544
    Thanked 128 Times in 106 Posts
    Rep Power
    60
    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

  4. #4

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,492
    Thank Post
    1,451
    Thanked 1,197 Times in 812 Posts
    Rep Power
    711
    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...

  5. #5
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42
    Quote Originally Posted by TonyRidal View Post
    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?

  6. #6
    BatchFile's Avatar
    Join Date
    Aug 2007
    Location
    Cumbria
    Posts
    948
    Thank Post
    544
    Thanked 128 Times in 106 Posts
    Rep Power
    60
    Quote Originally Posted by apeo View Post
    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?

  7. #7
    BatchFile's Avatar
    Join Date
    Aug 2007
    Location
    Cumbria
    Posts
    948
    Thank Post
    544
    Thanked 128 Times in 106 Posts
    Rep Power
    60
    Quote Originally Posted by JoshJohnson View Post
    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

  8. #8

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,492
    Thank Post
    1,451
    Thanked 1,197 Times in 812 Posts
    Rep Power
    711
    Quote Originally Posted by TonyRidal View Post
    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

  9. Thanks to LosOjos from:

    BatchFile (11th March 2010)

  10. #9


    Join Date
    Sep 2008
    Posts
    1,783
    Thank Post
    329
    Thanked 260 Times in 212 Posts
    Rep Power
    120

  11. Thanks to penfold from:

    BatchFile (11th March 2010)

  12. #10


    Join Date
    Sep 2008
    Posts
    1,783
    Thank Post
    329
    Thanked 260 Times in 212 Posts
    Rep Power
    120
    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.

  13. Thanks to penfold from:

    BatchFile (11th March 2010)

  14. #11
    apeo's Avatar
    Join Date
    Sep 2005
    Location
    Lost
    Posts
    1,612
    Thank Post
    95
    Thanked 115 Times in 111 Posts
    Rep Power
    42
    Quote Originally Posted by TonyRidal View Post
    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:

    Code:
    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?
    Last edited by apeo; 11th March 2010 at 11:20 AM.

  15. Thanks to apeo from:

    BatchFile (11th March 2010)

  16. #12

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,492
    Thank Post
    1,451
    Thanked 1,197 Times in 812 Posts
    Rep Power
    711
    Quote Originally Posted by penfold View Post
    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

  17. #13
    BatchFile's Avatar
    Join Date
    Aug 2007
    Location
    Cumbria
    Posts
    948
    Thank Post
    544
    Thanked 128 Times in 106 Posts
    Rep Power
    60
    Yeah, thanks all

    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

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 0
    Last Post: 20th August 2009, 07:07 PM
  2. [Video] 8 Bit Water Slide
    By mattx in forum Jokes/Interweb Things
    Replies: 1
    Last Post: 3rd April 2009, 08:35 PM
  3. [NSFW] Inappropriate Kid's Slide
    By mattx in forum Jokes/Interweb Things
    Replies: 4
    Last Post: 22nd September 2008, 11:24 PM
  4. Slide show for assembly etc.
    By reggiep in forum How do you do....it?
    Replies: 11
    Last Post: 28th April 2008, 11:09 AM
  5. Slide layout Views
    By russdev in forum General Chat
    Replies: 4
    Last Post: 28th March 2007, 03:06 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •