Log in

View Full Version : Why does my VBA module disappear



marsy00
09-12-2012, 11:31 AM
Hello,

I've written a number of macros that I've stored in a template.dotm file and placed it into my word startup folder. For some reason, now when I open a new doc or open the .dotm directly, the module with the vba code is gone. The toolbar shortcuts that I created are still there and the mouseover lists their name, but if i click them it says macro cant be found.

Fortunately I have the code saved off somewhere else, but what causes this and how do i prevent it? This happened to me before with a .docm file and that time i didnt have a backup of the code.

Thanks for your help

(Word 2007)

Frosty
09-12-2012, 01:31 PM
Look at your trusted locations. You may have macro security set to High, or you may have group policies in place that prevent execution of macros from untrusted sources.

marsy00
09-12-2012, 02:42 PM
Ok this is weird. Can someone tell me if this is normal or am I doing something wrong?

i have a file: macros.dotm that I store in my word startup folder, which I've defined as a custom location on my C drive. If I open macros.dotm from within the word startup folder, the VBA module is hidden from me. I can still run the macros however.

If I copy macros.dotm to my desktop, then I'm able to view/edit the VBA module.

Is this normal? Do I really have to copy the file to a temporary location to make edits then copy back?

Thanks

Frosty
09-12-2012, 03:13 PM
When a macro template is loaded during startup, it will not allow you to expand the macros the way you can with Normal. You need to also open the template itself.