Results 1 to 13 of 13
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run a Macro on Slide Open (PP97)

    Hi folks,

    Anyone know how to run a macro automatically when an individual slide opens during a Show - i.e. VBA command?

    Can do this with click'able hyperlink obviously, but can it be done automatically?

    Thanks in advance,

    Ade

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    Don't know about automatically, but you can improve on the 'clickable' hyperlink by setting up a 'mouse over' hyperlink.
    Make sure your macro exists in PowerPoint.
    Draw rectangle over the whole slide; with the rectangle selected, click on Slide Show | Actions Settings and click on the mouse over tab. Set it up to run the macro, OK it and then change the rectangle properties to No Fill and No Line.
    Now, when the slide show is running, you can just shake the mouse to wake up the pointer and it will run the macro (because the whole slide is 'active' because of the invisible rectangle)
    Not quite what you wanted, but it might help.
    Cheers <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Silverback

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    That's a cheeky little work around - nice thinking.

    I'll keep my options open just now though - the slide show I'm working on is an unattended display at a conference - i.e. there might not be a mouse to move!

    Thanks for your help,

    Ade

  4. #4
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Ohio, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    Thought of this last night. If the unit may not even have a mouse (or keyboard?), how are you going to start/run the computer or presentation? I'll assume you have that figured out.

    I also realize this may miss you entire point as to run a macro upon viewing a certain slide. You may want to post this in the VBA forum.


    So, Why not set up the presentation the way you want it to run, including looping and save it as a "PPS" file. Then place a shortcut to that file in the starup folder? This way when the computer boots, your presentation would run.

  5. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    I'll try posting orginal in VBA forum.

    Thanks for your thinking on the lack of keyboard/mouse - pps is the obvious solution, but as you say - this doesn't address the issue of runing a macro upon viewing a certain slide.

    Cheers,

    Ade

  6. #6
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Run a Macro on Slide Open (PP97)

    What do you want to have happen?
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    When, lets say, the last slide opens (during a Show) I want it to automatically call a VBA procedure - without the viewer having to click a hyperlink etc.

    Ade

  8. #8
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Run a Macro on Slide Open (PP97)

    Would it work if you launched the slide show via a vba process and had it count the slides in the show - waiting until the chosen slide was active to launch the next macro?

    Unfortunately, I don't know enough about PPT's VBA model to actually do this you understand. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  9. #9
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    That's a distinct possibility - but, likewise, I'm an Access and Word VBA chap and don't know the PP module well either.

    I may give it a go, but the slide in question is, in effect, an add-in - i.e. I'm designing an info request user form that links to backend database; I intend for it to be made available to anyone in our company that wants to use it. Hence, I won't know what slide number it will be in their presentations?

    Thanks for your help.

    Ade

  10. #10
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Ohio, USA
    Posts
    163
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    In trying to piece together your true final product, I understand that you're trying to run a presentation in a Kiosk, most likely without any other human intervention. Yet at a given point, the last slide at this point, you want to 'branch' somewhere else. It sounds like this is a base presentation design that various other departments will use in different ways, thus have a different slide count. Is that up to date?

    What is this other data you're jumping to?

    Why can't you use a touch screen and put a hyperlink on the last page? There are several manufacturers that produce touch screen monintors as well as companies like Javelin Computers that produce touch screen PC's.

    The next thought would then be to build a larger "one roof" application and allow users to use the touch screen to navigate.

  11. #11
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    In order...

    Yes, you're spot on.

    Access Database to record information requests from viewers of the presentation.

    Touch screens are very "nice", but beyond the realms of our company.

    Thanks for your ideas, but I think I'm going to stick with a clickable/mouse-over hyperlink.

    ==================

    Unless anyone knows the VBA code for what I need...then I think we've exhausted this thread - it appears to be beyond the PP VBA module.

    Many thanks and until next time...

    Regards,

    Ade

  12. #12
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run a Macro on Slide Open (PP97)

    It would appear that PP does not expose the slide event in VBA <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=vb&Number=62785&page=0& view=collapsed&sb=5&o=0&vc=1>(see this post).</A>

    Ade

  13. #13
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Run a Macro on Slide Open (PP97)

    I'm taking this from the help file in PPT:

    SlideShowWindow Property Example

    The following example shows the Click event procedures for buttons named "cmdBack" and "cmdForward". If you add these buttons to the slide master and add these event procedures to them, all slides based on the master (and set to show master background graphics) will have these navigation buttons that will be active during a slide show. The Me keyword returns the Master object that represents the slide master that contains the control. If the control were on an individual slide, the Me keyword in an event procedure for that control would return a Slide object.

    Private Sub cmdBack_Click()
    Me.Parent.SlideShowWindow.View.Previous
    End Sub

    Private Sub cmdForward_Click()
    Me.Parent.SlideShowWindow.View.Next
    End Sub

    <img src=/w3timages/pink2line.gif width=33% height=2>
    This sounds a little like want you wanted to do and yes, I was able to put command buttons on the master that would run the macro while in the slide show.

    BTW once you place the command buttons on the master - the master object is visible (exposed?) in the Visual Basic Editor.

    Cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

Posting Permissions

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