Search code examples
vbapowerpointpowerpoint-2007

PowerPoint 2007/2010 VBA ppam Add-In does not show up in VBA editor when open


I've created a PowerPoint 2007/2010 VBA Add-In (.ppam) some code in a module. I've also added an XML ribbon (not important, but it shows me that the file is in fact open in PowerPoint). I can click a button in the ribbon I created and it will execute code from my module. cool.

When I open the VBA editor (ctrl + F11), the Add-In does not show up. In fact, if I don't have another document open I can't even open the editor. I've tried this in PowerPoint 2007 and 2010.

How can I edit the code of a PowerPoint Add-In I've already created? I've made many VBA Add-Ins in Excel, but maybe PowerPoint is different (am I crazy)?


Solution

  • You cannot directly edit a .ppam as it is sort of "compiled". The way to do this is maintain all your code/customizations in a .pptm (and make sure you keep that .pptm as a .pptm) and when you want to test it as an add-in, do a "Save As.." to a .ppam and then load it. Not happy with it? Go back to your .pptm and make the changes there.

    BTW, if you don't want to use the Ribbon just to ensure it has loaded as an add-in, just use an AutoOpen macro (in any module), like:

    Sub Auto_Open()
        MsgBox "My add-in has loaded"
    End Sub
    

    You can remove that AutoOpen macro later, once you're satisfied with your add-in.