Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating PowerPoint Add-Ins from VBA defined Macros

So I've created a Macro in a PowerPoint Presentation and I would like to make this Macro readily available to someone else. From what I have gathered, the best way to do this is to create an Add-in.

I have come across several articles stating to do the following, but I am still running into problems:

  1. Open a new PowerPoint Presentation
  2. Create a macro using VBA
  3. Exit VBA, and save the Presentation as a .ppam
  4. Under the Developer Tab, click on the "PowerPoint Add-ins" button
  5. Click the "Add New..." option, and browse for your recently created .ppam file
  6. Click Load
  7. Click Close
  8. Click Add-ins
  9. You should now see your new Add-in

I have done everything mentioned above and can even see the new Add-in when I select PowerPoint Add-Ins. I'm here because I can't find a way to run the new Add-in, and I don't want it to automatically load on startup or to interfere with the presentation by creating a button on the slides. As instead, I would like to allow the user to run this Add-in from the Ribbon.

Thoughts?

like image 262
CroissantEngineer Avatar asked May 31 '16 13:05

CroissantEngineer


1 Answers

First, save as PPTM. THEN save as PPAM. If you only save as PPAM, you won't be able to go back and edit your code later to correct problems.

To launch your add-in from the ribbon, you must include RibbonX code (a type of XML) to your PPAM or PPTM (best to add it to the PPTM ... it'll become part of the PPAM automatically then).

There's an excellent book on RibbonX that'll save you hours of time: http://www.amazon.com/RibbonX-Customizing-Office-2007-Ribbon/dp/0470191112

This is a good starting point if you don't want to buy the book: https://blogs.msdn.microsoft.com/jensenh/tag/all-office-2007-ui-posts/

While you can manually unzip PPTM/PPTX/PPAM files and add the RibbonX code using any text editor, it's silly to do so. Instead use this free tool:

http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2009/08/07/7293.aspx

like image 147
Steve Rindsberg Avatar answered Oct 06 '22 23:10

Steve Rindsberg