0

I have written 2 Macros in PowerPoint and added the Macros to a customized ribbon named 'My Ribbon' to make those macros available at a click of a button. The only problem is the Ribbon disappears when someone else opens the PowerPoint on a different computer. The macros stay with the file but the customized ribbons do not and we have to create another customized ribbon, and place both macros to the ribbon every time we share the file across our drive.(Which is quite annoying)

I want to permanently append the customized ribbon to the PowerPoint so that anyone who opens the PowerPoint will be able to see the personalized ribbon with both Macros already on their version of PowerPoint.

Thierry Dalon
  • 779
  • 5
  • 21
dHumphrey
  • 307
  • 2
  • 7
  • 24
  • You haven't explained exactly how you've created the buttons or indicated which versions of PowerPoint are in use; w/o that information at a minimum, troubleshooting this would be guesswork. – Steve Rindsberg May 21 '15 at 15:22
  • It is not easy task in VBA, there is no clean way to add ribbon via VBA macro, you would need to modify the insides of file package by changing manually extension to .zip accessing the xml data and modifying it there manually. The official tool for doing this kind of macro is C# + addins – KKowalczyk May 21 '15 at 15:35
  • I am using PowerPoint 2013. I created the buttons manually using **File, Options, and added a Customized Ribbon ** I then added the Macros to the ribbon and named them. I want to automatically have a ribbon permanently appended to the specific PowerPoint and add the 2 Macros so that when I share the file, the Ribbon ( or add-in if thats an option) is already there. – dHumphrey May 21 '15 at 15:49
  • As Eugene mentions, you'll want to create an add-in, and you'll need to add custom XML to your PPTM file before saving it as an add-in. Rather than unzipping and adding the XML manually, you can use one of several tools to add the XML easily. As it happens, I've added a new page about this to the PPT FAQ today. Create an ADD-IN with Ribbon buttons that run macros when clicked http://www.pptfaq.com/FAQ01216-Create-an-ADD-IN-with-Ribbon-buttons-that-run-macros-when-clicked.htm – Steve Rindsberg May 22 '15 at 02:33
  • I finished it! It all worked out perfectly! I created a custom xml in the Custom UI for Office and created macros and linked the two. Works perfectly! Thanks to all! – dHumphrey May 22 '15 at 18:04

2 Answers2

0

VBA macros are not designed for distributing the code on multiple PCs. If you need to get a solution which can be installed on other PCs you need to develop an add-in. That's exactly they were invented for. Moreover, you can create an installer for the add-in. It will be installed as other applications on your PC. See Walkthrough: Creating Your First Application-Level Add-in for PowerPoint to get started.

If you choose to stay with VBA macros, you will have to edit the open xml document. See Customize the Word Ribbon User Interface for more information. The process is common for almost all Office applications (Outlook does't support that).

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
0

You could use such a program like Ribbon Editor to customize the Ribbon for your pptm file only. (No need for an AddIn it you want it deployed only with the file)

Thierry Dalon
  • 779
  • 5
  • 21