Why can't I use macros in dotm files?

I prepared a macro-containing document in Office 2011 on the Mac, saving it as .docm and then as a .dotm to make it a template. It contains a button in a bookmark to load and paste a picture into a bookmarked location in a protected (for forms) document. The macros run just nicely on the Mac. 

When I first imported it to Windows 7 and Office 2010, it gets stuck at a Left$() function call, complaining Word "Can't find project or library". When I look at References, it lists

MISSING:Normal.

(The location given is the folder where the original file was.)

I returned to the Office on the Mac and in looking at its references, there is indeed one to Normal in this folder, though there is no Normal file there. I unchecked it and resaved the docm and the dotm. The docm file itself now works fine under Office 2010, but the .dotm file does not complaining continuing to complain as before, though the strange reference to Normal is gone. Does any know why the .dotm file isn't working while the .docm is? The end user can use the .docm, but a template would make it cleaner.

Answer
Answer

Your template was looking for the Microsoft Office 14.0 Object Library in the C:\Program Files\Common Files\microsoft shared\OFFICE15 folder.   By saving the template as a .docm file, then attaching my Word 2010 Normal.dotm template to it (which contains a reference to the Microsoft Office 14.0 Object Library in C:\Program Files\Common Files\microsoft shared\OFFICE14) and then saving it again as a .dotm file, it now works correctly. 

Note: The Sub AutoOpen() had only partly been commented out.

If you are not able to apply the same fix yourself, send me an email message and I will send you a copy of the modified template.

Hope this helps,
Doug Robbins - MVP Office Apps & Services (Word)
dougrobbinsmvp@gmail.com

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated April 14, 2025 Views 651 Applies to: