Search code examples
vbapowerpointribbonoffice-addins

Editing the ribbon of an existing Power Point Add-In (to fix display error)


I have been asked to remedy a display error of an already existing Power Point Add-In (error occurs when moving from Office 2007 to Office 365) See picture below

Part of Add-In Ribbon, showing the display errors

I need to get rid of the parts highlighted by the red boxes.

Primary question: How do I open the add-in-file (I have the original .pptm file) so that I can edit how the ribbon is displayed?

My Background: I know VBA very well but have never done XML-development of the ribbon before.


Solution

  • A pptm file uses the Open Packaging conventions of the Office Open XML specification. Open the pptm with WinZip or 7-zip, or rename the .pptm to .zip, and browse the contents. You should find a file within the zip-file called something like CustomUI.xml or CustomUI14.xml, although the exact name can be anything, and will be specified in the .rels file in the root of the file (there can be 2 files, one for Office 2007 and later ribbons, and one for Office 2010 and later, in which case the 2007 version is ignored in 2010 and later).

    Once you've found the file, extract a copy, make your edits in any text editor, and then copy the file back into the pptm, replacing the existing ribbon customization file.

    Then load the pptm, and check your changes were successful.

    PowerPoint add-ins don't show their code in the VBE, by default, although macro-enabled presentations do. If it is an add-in, you may need to tweak the registry in order for the add-in project to display. See this article for details: How To View Your PowerPoint Add-in VBA Code Inside The Visual Basic Editor