Results 1 to 1 of 1
2005-06-27, 14:31 #1
- Join Date
- Jul 2001
- Edison, New Jersey, USA
- Thanked 0 Times in 0 Posts
Sometimes a .dot is not really a Template!? (MSWord 2000/ WIN XP)
I hope this little troubleshooting scenario I recently went through helps someone else trying to troubleshoot an awkward template/macro behavior problem.
I have a bunch of templates containing macros associated with each template that direct the naming of and location for saving the newly created document. They get called via a GenerateDocument Macrobutton.
The symptom was that clicking on the Macrobutton grabs the correct template.dot and displays the correct document, but it doesn't seem to execute the macro info associated with it. It looks to me like all the names are correctly spelled, etc., so it should work.
After digging around, I determined the problem with my macros was the new docs end up with ActiveDocument.AttachedTemplate.Name = Normal.dot. The attached template name should be the name of the related template (not Normal.dot). My macros take action based on the name (i.e., based on just which template is active). Normal.dot is obviously not one of my special templates so the macro was not doing what I needed it to do.
When I edit the template.dot, I can see Normal showing in the Templates and Add-ins dialog box, but every time I delete it, it comes back automatically. So I dug around some more