Microsoft Knowledge Base Email Alertz

(873017) - Describes a problem where your Normal.dot file increases in file size when an add-in that contains a VBA macro is loaded in Word 2003 that adds and removes a CommandBar item to a menu in Word 2003.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 873017 - Last Review: July 27, 2006 - Revision: 4.3

Your Normal.dot file may increase in file size when you quit Word 2003 if a Word-specific add-in that contains a VBA macro is loaded when you start Word 2003

SYMPTOMS

If a Microsoft Word-specific add-in that contains a Microsoft Visual Basic for Applications (VBA) macro is loaded when you start Microsoft Office Word 2003, your Normal.dot file may increase in file size when you quit Word 2003.

Note A Word-specific add-in is sometimes referred to as a global template.

CAUSE

This problem may occur if the following conditions are true:
  • A Word-specific add-in in the Word Startup folder contains a VBA macro.
  • The VBA macro adds a CommandBar item to a menu when Word 2003 starts, and then the macro removes the CommandBar item from the menu when you quit Word 2003.

WORKAROUND

To work around this problem, create a global template and then load it in the Word Startup folder. In the VBA macro that adds the CommandBar item, use the VBA command customizationcontext to point to the template in the Word Startup folder instead of the Normal.dot file.

For more information about the customizationcontext property, see the VBA Help file in Word. To access Visual Basic Help, in Word, point to Macro on the Tools menu, and then click Visual Basic Editor. In Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu. Then, type customizationcontext in the Search for box in the Assistance pane, and then click Search.

If you are not familiar with Visual Basic programming, there are resources that are available to help you. For more information about some of the programming resources that are available, click the following article number to view the article in the Microsoft Knowledge Base:
826531  (http://kbalertz.com/Feedback.aspx?kbNumber=826531/ ) List of some programming resources for Visual Basic programming in Office 2003

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

APPLIES TO
  • Microsoft Office Word 2003
Keywords: 
kbtemplate kbaddin kbprogramming kbautomation kbprb KB873017
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Colin Oatway - bond.st NOSPAM-AT-NOSPAM clear.net.nz Reported as Irrelevant  
Written: 9/29/2004 9:55 PM
The following works with Word 2000/2002/2003 1. Create a Template with the menus and toolbars you require. (eg C:\MyTemplates\MyToolbars.dot) 2. Add your Global Template with your VBA code to the startup folder for Word. 3. Code in this template should add your toolbar template to the AddIns collection 4. After adding it to the AddIns collection it will require the following: Dim savedtotemplate as template Set savedtotemplate =Templates("C:\MyTemplates\MyToolbars.dot") 5. At the end of the code that changes toolbars the following should be entered Templates("C:\MyTemplates\MyToolbars.dot".Saved=True This will fool Word into thinking the changes have been made to the toolbar template. Since we are not modifying the Normal.Dot template it doews not grow.

Anonymous User Reported as Irrelevant  
Written: 12/13/2004 12:06 PM
You can also simply add this code to the Close() event of the object ThisDocument : ThisDocument.AttachedTemplate.Saved = true.