8

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?

ashleedawg
  • 20,365
  • 9
  • 72
  • 105

1 Answers1

7

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

Steve Rindsberg
  • 14,442
  • 1
  • 29
  • 34
  • @Tameem And you just quadrupled my paycheck. Or more. ;-) – Steve Rindsberg May 31 '16 at 19:20
  • Works well for changing the ribbon, but note that if you need to touch any existing vbaProject.bin files, you'll need something else (not sure what yet). – J E Carter II Jun 20 '19 at 13:07
  • @JECarterII Those would be the .bin files visible in the unzipped PPTM or PPAM files? What would require needing to edit those? Missing PPTM source file and only a PPAM available? – Steve Rindsberg Jun 22 '19 at 14:32
  • @SteveRindsberg, we wound up needing the PPTM file. Fortunately we were able to locate it. Without the PPTM, we would have been limited in what we could have edited. It contained all of the VBScripts called by the actions in the ribbon. – J E Carter II Jun 24 '19 at 15:17
  • @JECarterII Well, VBA code, rather than VBScript, which is a different language. If all you have is a PPA or PPAM file, see this: https://stackoverflow.com/questions/17569893/edit-a-ppam-file-for-customizing-an-add-in/17573427#17573427 – Steve Rindsberg Jun 24 '19 at 19:02