Share via

97-2003 ppt/ppa VBA code

Anonymous
2016-02-16T19:48:07+00:00

Currently using o2010 (x32) on Win7 (x64)

I'm trying to revive an old project from way, way back. I've found both a ppt and a ppa version of the file. I've set my RegEdit using the instructions here http://skp.mvps.org/ppafaq.htm#6 (hopefully I did it correctly-see below, I wasn't sure which way was correct so I did both)

I can put the ppa in the add-ins folder and load it as an add-in, but not see the code module in VBA. I can open the ppt, but it just auto-loads as an add-in, and again, I can't see the code module. Basically, neither show up under the VBA Project list, both show up in the add-in list.

Any suggestions for next steps?  

Image: where I set DebugAddins per the ppaFAQ

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
2016-02-18T16:31:34+00:00

So if I understand this correctly, you open a PPT that should have VBA code in it and nothing related to it appears in either PPT itself or in the VBA IDE?

It might be that the PPT itself is corrupted.  To see if it's a file or PPT problem, create a brand new file based on the MS-supplied Default blank template, add a bit of VBA:

Sub MitToMePPT()

   MsgBox "Steve, that's a stupid name for a subroutine. Are you SERIOUS?"

End Sub

Save it as a PPT, quit and restart Powerpoint, re-open the file and check to see whether you can view the code.  If so, save it as a PPA, load the PPA as an add-in and again check to see what's visible in the VBA IDE.

Also, and actually before embarking on the above, check File | Options | Trust Settings, click the Trust Settings button.

Add-ins section:  remove all checkboxes

Macro Settings section:  choose "Disable all macros with notification" (ie, give you a warning when a file contains macros, let you choose whether to enable it or not). 

Protected view:  here I've got 'em all checked and it doesn't seem to interfere with anything (though I have to unblock files downloaded from the internet)

Message Bar:  Choose "Show the Message Bar ..." so PPT at least barks audibly when it's blocking something.

File Block Settings:  Everything's unchecked here.  "Open selected file types in Protedted View" is chosen but since no file types are selected, it's irrelevant.  If any of your file types are checked, that might be the problem.

If any of those settings needed to be changed to match mine, OK the Options dialog, quit and restart PPT and try again.

And as another issue, something's resetting your DebugAddins reg entry from 1 to 0?   Is this your own PC or one under corporate/IT control?  If the latter, they may have policies in place that limit what you can do in VBA.

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
    2016-02-18T22:27:27+00:00

    Off to a good start then ... great!

    If the "troubled" presentation doesn't contain any sensitive info and you'd like to post it on OneDrive/DropBox/Etc for us to take a look, do that and post the link here.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-02-18T17:01:06+00:00

    ** Thank you ** for taking the time to review and type out all the settings for me to check.

    • All of my trust settings already matched your recommendations
    • I am in a corporate IT environment. They tend to reset settings on reboot or (more often) just lock users completely out of different areas. I'm actually surprised I can access RegEdit, but I'm not going to complain :) 
    • I was surprised that the DWORD setting changed on me, and I'm not sure what would have triggered it. I haven't seen it do that in any later testing. 

    After running through your test procedure, I am able to create the initial .pptm file, and a .ppa from that. When I load the .ppa, I'm able to see the code module and code- so I think your assessment is correct, the old file is probably corrupt.

    I'll look around to see if I have any other backups of this file (this was not a corporate file, so it was not covered by corporate automated backups). If I can't find an earlier copy, then I think it is time to start rebuilding...

    Many thanks!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-02-17T14:04:14+00:00

    Steve, thank you for the reply.

    I confirmed that the key I'm working on is in

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

    I removed the second registry setting (shown in my original post), to make sure it wasn't causing interference.

    In powerpoint, I removed all add-ins (not just unchecked, but actually clicked 'remove' in the userform). Confirmed there are no add-ins showing in that dialogue box.

    Closed powerpoint

    I have regedit open, and refresh after each action because I'm paranoid; when I re-open powerpoint 2010, it reset debugaddins to 0. So, I set it back to 1

    In powerpoint, I used the menu File/Open command to open the target .ppt file (yesterday, I was trying to open it by right-clicking the file itself, and saying open in powerpoint, so I tried this just to make sure it wasn't an issue with how Powerpoint is called)

    When prompted, I enable macros 

    Alt-F11 to open the VBE

    All I see is the blank file from when powerpoint loads, no code modules and nothing at all referencing this file that has just opened. Note that this file does not have anything visible in the main powerpoint UI either

    but the add-in is now loaded:

    And reconfirmed that nothing had messed with the registry, the value is still 1

     

    I then repeated all of the steps above, but disabled macros, in case there is something in the _open that is causing problems, but same result (except the add-in isn't loaded in the available add-in box).

     Although I didn't expect anything different, I also repeated this with the .ppa file, with the same results.

    Thanks for any additional thoughts or feedback!

    Was this answer helpful?

    0 comments No comments
  4. Steve Rindsberg 99,166 Reputation points MVP Volunteer Moderator
    2016-02-17T03:07:14+00:00

    It's hard to tell from your screenshots whether you've added DebugAddins in the correct place.

    It should be here:

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

    Rightclick Options, choose New, DWORD value to add DebugAddins and set its value to 1.  Your second example should be removed.

    Was this answer helpful?

    0 comments No comments