This appears to be a bug in Word 2003:

We run code (by way of AutoExec macro in a global template in the Startup
folder) to delete and then rebuild a company toolbar when the user starts
Word. The following line deletes the Company toolbar:

CommandBars("Company").Delete

In Word 2003 when you go to Tools, Customize it will be gone. However it is
still there when you look at the Organizer (from Tools, Templates and
Add-ins) and, sure enough, when you restart Word 2003 the toolbar is back (in
Word 97 it works fine, immediately disappearing from both Customize and
Organizer).

There's been some talk about CustomizationContext in previous threads but
I've stepped through the code and the Context remains "Normal.dot"
throughout. I've also checked the path of the Normal template in the
Organizer so I know it's not another normal.dot I'm dealing with.

Any ideas please? The users are on my back with all the duplicate toolbars
that have started appearing in their Word...

Re: command bar won't delete in 2003 by Helmut

Helmut
Wed Mar 15 14:22:26 CST 2006

Hi Martin,

I'm not sure about your case,
but this one might help:

http://groups.google.de/group/microsoft.public.word.vba.general/browse_frm/thread/6a3062b0092373a8/f599422864f262f9?lnk=st&q=ontime+zSplash+group%3Amicrosoft.public.word.vba.*&rnum=1&hl=de#f599422864f262f9


Put the deletion in the "continue" sub.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"




Re: command bar won't delete in 2003 by Martin

Martin
Thu Mar 16 05:37:27 CST 2006

Well I've solved it: it does appear to be a bug (CommandBar.Delete only
removes toolbars temporarily in 2003). Using the macro recorder and
replacing the hard paths that appear, I've come up with the following (which
is fortunately backwardly compatible to 97):

Application.OrganizerDelete Source:= _
NormalTemplate.Path & "\Normal.dot" _
, Name:="Company", Object:=wdOrganizerObjectCommandBars

This deletes the toolbar properly from the source template (in my case the
normal template of the particular user).

"Helmut Weber" wrote:

> Hi Martin,
>
> I'm not sure about your case,
> but this one might help:
>
> http://groups.google.de/group/microsoft.public.word.vba.general/browse_frm/thread/6a3062b0092373a8/f599422864f262f9?lnk=st&q=ontime+zSplash+group%3Amicrosoft.public.word.vba.*&rnum=1&hl=de#f599422864f262f9
>
>
> Put the deletion in the "continue" sub.
>
> --
> Greetings from Bavaria, Germany
>
> Helmut Weber, MVP WordVBA
>
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"
>
>
>
>