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
Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!
+ Get this BONUS — free!
Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!