Consulting

Results 1 to 5 of 5

Thread: Solved: How To Auto Run PPT Macro

  1. #1
    VBAX Tutor jamescol's Avatar
    Joined
    May 2004
    Location
    Charlotte, NC
    Posts
    251
    Location

    Solved: How To Auto Run PPT Macro

    OK - I'm stumped. I have a custom form I want to start when a user opens a PPT template. I tried using the PresentationOpen and NewPresentation subs, but it looks like some other procedure needs to trigger them.

    Anyone have any ideas?

    Thanks,
    James
    "All that's necessary for evil to triumph is for good men to do nothing."

  2. #2
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    From VB: http://www.rdpslides.com/pptfaq/FAQ00580.htm

    The honest truth: http://www.rdpslides.com/pptfaq/FAQ00611.htm

    In particular, this part:

    Code That Runs Automatically
    Some Office applications have a way to run VBA code automatically when the user opens a document; not PowerPoint.

    But an Auto_Open subroutine within an Add-in will run at the time the Add-in loads, so IF you can create an Add-in and install it on the user's computer Create an ADD-IN with TOOLBARS that run macros then
    The Add-in can respond to events - Make PPT respond to events
    • It can detect things like "The user just opened a presentation".
    • You could use this and some extra code to detect that "The user just opened OUR presentation" and run any other code you like in response.
    ~Anne Troy

  3. #3
    VBAX Tutor jamescol's Avatar
    Joined
    May 2004
    Location
    Charlotte, NC
    Posts
    251
    Location
    Thanks Dreamboat! I was able to create the add-in and load a custom toolbar and Tools menu option. What a pain to launch code in PPT

    Interesting, though, this solves another issue for me. Since the add-in stores all the VBA code, I can now separate the code from the presentation. Now we can send it customers after we're done without the VBA code.

    James
    "All that's necessary for evil to triumph is for good men to do nothing."

  4. #4
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Mark it solved?

    (After all your help, it's about time you got some!)
    ~Anne Troy

  5. #5
    VBAX Tutor jamescol's Avatar
    Joined
    May 2004
    Location
    Charlotte, NC
    Posts
    251
    Location
    Ha! Yep - this is solved!
    "All that's necessary for evil to triumph is for good men to do nothing."

Posting Permissions

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