Share via

PowerPoint Macro Enabled Template load problems

Anonymous
2011-02-02T08:33:29+00:00

I have a macro enabled template for PowerPoint 2007/2010 that uses an OnLoad command in the Ribbon XML to set up an event handler for the template. I have recently found a strange problem with the template that and I'm not sure exactly what could be the cause.

The template and the OnLoad macro run fine as long as the template is opened AFTER starting PowerPoint. If I open the file from Explorer, however, I get a message that my the macros cannot be found or have been disabled by my security settings, both which are not the issue. I have all macros enabled and I have checked the callback in the UI editor. I get the same issue with both 2007 and 2010. Here is the xml markup I am using. The 2007 is identical except for the date.

<customUI onLoad="startevents" xmlns="http://schemas.microsoft.com/office/2009/07/customui" >

</customUI >

Is my OnLoad callback not written correctly for the initial load sequence, or is it something to do with the template format? Thanks in advance for any advice or suggestions.

Microsoft 365 and Office | Install, redeem, activate | For home | Other

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

Anonymous
2011-02-02T09:34:42+00:00

When you open a potm file from explorer it creates a NEW presentation based on it NOT the original. Your onLoad is looking for the macro in the ORIGINAL and it's not there.

There's no reliable way to do what you are trying unless you create an AddIn with event handling in a Class module that detects the Template. This would need to on all PCs.

The same thing will happen if you create New from template. If you are distributing the template you would also have problems with macro security on users PCs.


Microsoft® MVP PowerPoint® since 2007.

Web Page: PowerPoint Alchemy Hints and Tips

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2011-02-02T10:16:37+00:00

    I see. I guess the better thing to do would be to simply save the file as a presentation rather than a template. Thanks for the heads up.

    Was this answer helpful?

    0 comments No comments