View Single Post
 
Old 07-16-2015, 11:24 AM
mrlemmer11 mrlemmer11 is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Jun 2015
Posts: 13
mrlemmer11 is on a distinguished road
Default Using templates on start of Word Application

Hello,

So.... I've been working on this project where I have 2 userForms and 1 module... all of which contain macros/subs/functions inside of them. I have been doing this all under the Normal.dotm file.

At this point, I have gotten everything functional and happy with the results. However, from my readings online I have found that it is definitely not a good idea to have all of these items tied to the Normal.dotm file since other people in my group need access to these and I don't want to mistakenly erase unrelated things they may have in their own normal.dotm file.

With that being said, I did some reading and decided to create my own dotm file and have it reside on the startup folder for word. so myTest.dotm has the modules and userforms I exported from my normal.dotm file attached to it. It is saved in the startup folder. I have verified that this part is correct because if i launch a new word instance I can see that it recognizes these macros under the myTest.dotm file in run macros tool.

The problem comes when I try to run any of these macros though. I get:

Compile error in hidden module: protectMacros.
This eeor commonly occurs when code is incompatible with the version, platform, or architecture of this application. Click 'Help' for information on how to correct this error.

So what am I doing wrong? All of these items worked perfectly when in the normal.dotm file. All i did was export them from normal.dotm and imported them into myTest.dotm. I deleted them from normal.dotm. I added myTest.dotm to my startup
folder for word.

edit: I ensured that none of my code made reference to things like call normal.protectMacros.verify to which I changed it to call myTest.protectMacros.verify

Please help. Thanks.
Reply With Quote