Calling a macro from a template using OnAction
I have created a template called "Sandra Macros.dotm"
I have created a custom menu to call a procedure in this template
Set myCmdBarCtl = myCommandBar.Controls.Add(msoControlButton)
with myCmdBarCtl
.BeginGroup = True
.OnAction = "=SaveAllImages()"
End with
I attach the template to the current document
If I move the procedure SaveAllImages() to Normal.dotm the button works. If not I receive an error " The macro cannot be found or has been disabled because of macro security setting" - The macro security is low ... it works when in Normal.dotm.
How should I indicate to "OnAction" to search in the template? tried adding the template name .. did not work
|