Link to home
Start Free TrialLog in
Avatar of Bryce Bassett
Bryce BassettFlag for United States of America

asked on

The macro cannot be found or has been disabled because of your Macro security settings

Hi:

I have a macro-enabled Word 2007 template with a custom ribbon menu tab created using Custom UI Editor.  I get the above error message twice in a row each time I create a new document based on the template or open an existing document based on the template.

Word is installed fine and working perfectly.  My ribbon and all my VBA macros run perfectly.  It's just a nuisance.  The error occurs before it ever gets to the Document_New code.  I think it occurs when it is creating the menu tab, as if it were finding macros missing.  But  I've verified that each "onaction" macro referred to in the ribbon code exists, and has the appropriate (control as iRibbonControl) next to it.

I've had this before but can't remember how I resolved it.

Any ideas how to make this go away?

Thanks
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

I assume that this error happens even if macro security is set to super low. This usually means there are two buried in there somewhere that you missed somehow.

Check the macros manager (Alt+F8?) and make sure there aren't any that refer to another document.

Can you post the template? (Remove all proprietary/private information of course). We can help you dig.
ASKER CERTIFIED SOLUTION
Avatar of Bryce Bassett
Bryce Bassett
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That is telling it to run the macro named "OnLoad" when the ribbon loads. So that would be the offending macro.
Avatar of Bryce Bassett

ASKER

I found the answer on my own.  See above