You are visitor number
since 2 October 2004.
Go to Howard Kaikow's home page
Date: 3 October 2004(Revision of 2 October 2004 version)
From: Howard Kaikow <email@example.com>
Subject: Failure to delete a toolbar
It should be possible to delete a toolbar, then rebuild the toolbar in the same Word template. However, there are circumstances in which the previous toolbar(s) are not deleted and they may mysteriously travel in position from left to right.
Although the macro appears to delete the toolbar. When Word is exited and then restarted, there is more than one instance of the toolbar.
This behavior has been seen in Word 2000, Word 2002, and Word 2003, but not in Word 97.
I am providing a .zip file that contains two Word templates. At this time, I am providing templates that were created in Word 97, but the template should be usable in Word 97, Word 2000, Word 2002, and Word 2003.
Both templates should create a toolbar, "Test Toolbar", that you can use to run the macros to be tested.
Each template has two macros. One creates a toolbar in the Normal template. The other creates the toolbar in the template itself.
My experience has been that the macro produces the expected result when the toolbar is created in the template itself, i.e., there is never more the one copy of the toolbar.
However, when the toolbar is created in the Normal template, eventually, more than one copy of the toolbar will be created in the Normal template and, eventually, the toolbar(s) will travel from left to right on subsequent invocations of the macro.
In order to reproduce the results, please do exactly the following:
OK, now try creating the toolbar in the template itself.
Note that copying the macros from the template to the Normal template and then running the macros in the Normal template does not avoid the error. Indeed, it is worse because then the MacroContainer context example also fails to produce correct behavior,