Search code examples
excelvbapowerpoint

Edit a .ppam file for customizing an add-in


I was provided an add-in for powerpoint as a .ppam file and another add-in for Excel as .xslm file. The add-in's work great, but I would like to customize them with some internal requirements.

My questions is - how to open the source code behind a .ppam file ( which I understand is a compiled version) to be able to perform the customizations.


Solution

  • If it's a PPAM file, it was created in PowerPoint from a PPTM file saved as an add-in.

    While you can edit loaded add-ins "in place" for testing purposes, you can't edit then save them. But you can export the add-in's modules then import them into a new PPTM file or copy/paste code between the two.

    In order to get access to the modules/code of the loaded add-in, you need to make a registry change.

    IMPORTANT: Quit PowerPoint first.

    Then go to:

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\PowerPoint\Options

    (That'd be for PPT 2010; substitute 16.0 in place of 14.0 for PPT 2016/2019/2021/365 and later, 15.0 for PPT 2013, 12.0 for PPT 2007 and so on ... there's no 13.0)

    Add a new DWORD value: DebugAddins = 1

    Start PPT again; now your loaded add-ins will appear in the VBA IDE. If they're not password protected, you'll be able to open them, edit for test purposes, and export the modules or copy/paste for use in a new PPTM file.

    Be sure to export any modules you've changed fairly often; if you quit PPT or it crashes, you'll lose any changes since the last save.