delete a custom toolbar in Word 2003XP

C

CJ

Can anyone advise me why a custom toolbar can't be deleted unless it's
deleted by the Organizer? Using customization/delete deletes the toolbar,
but when restarting Word, those deleted toolbars resurface........... I found
that using the Organizer does the trick, but why would this happen?
 
G

Graham Mayor

Custom toolbars are stored in templates or documents. Unless you save the
template or document after deleting the toolbar, it remains in the template
or document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

CJ

I actually opened normal.dot physically, and used customization to delete the
toolbar. Saved the template, closed, reopened, and toolbar was back. The
only way I could achieve the deletion was through the Organizer. Just
curious, anyway as to why.
 
P

Peter T. Daniels

How did you open the template?

I actually opened normal.dot physically, and used customization to deletethe
toolbar.  Saved the template, closed, reopened, and toolbar was back.  The
only way I could achieve the deletion was through the Organizer.  Just
curious, anyway as to why.
 
D

Dorak

C:\Documents and Settings\[my user id]\Application
Data\Microsoft\Templates\Normal.dot
 
J

Jay Freedman

If you double-clicked the file there, you opened a blank document based on
Normal.dot, and not Normal.dot itself. The default action for templates is
"New", not "Open".

To open Normal.dot itself, right-click the file and explicitly choose the
Open action.

The alternative (somewhat roundabout) is to use the Open command in Word's
File menu, change the "Files of type" dropdown to Word Template, (if
necessary navigate to the Templates folder), and select Normal.dot there.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
C:\Documents and Settings\[my user id]\Application
Data\Microsoft\Templates\Normal.dot



Peter T. Daniels said:
How did you open the template?
 
D

Dorak

I know how to open the normal.dot. Opened it, did not double click. Still
have no idea as to why customization would not stick when deleting the
toolbar. Nothing on the web either, that's why I asked here......Have a nice
holiday, and it's obviously not worth much more of anyone's time on this
subject. I did get it deleted using organizer.

Jay Freedman said:
If you double-clicked the file there, you opened a blank document based on
Normal.dot, and not Normal.dot itself. The default action for templates is
"New", not "Open".

To open Normal.dot itself, right-click the file and explicitly choose the
Open action.

The alternative (somewhat roundabout) is to use the Open command in Word's
File menu, change the "Files of type" dropdown to Word Template, (if
necessary navigate to the Templates folder), and select Normal.dot there.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
C:\Documents and Settings\[my user id]\Application
Data\Microsoft\Templates\Normal.dot



Peter T. Daniels said:
How did you open the template?

I actually opened normal.dot physically, and used customization to
delete the toolbar. Saved the template, closed, reopened, and
toolbar was back. The only way I could achieve the deletion was
through the Organizer. Just curious, anyway as to why.



:
Custom toolbars are stored in templates or documents. Unless you
save the template or document after deleting the toolbar, it
remains in the template or document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

CJ wrote:
Can anyone advise me why a custom toolbar can't be deleted unless
it's deleted by the Organizer? Using customization/delete
deletes the toolbar, but when restarting Word, those deleted
toolbars resurface........... I found that using the Organizer
does the trick, but why would this happen?-
 
G

Gordon Bentley-Mix on news.microsoft.com

Custom toolbars are a PITA. I've been struggling with them for ages -
experiencing the same problems you've reported with 'orphan' toolbars hanging
about when I thought I'd deleted them. However, I think I've finally found a
method that works.

I create the toolbar (which is called "Rerun") when a document based on a
particular template is opened using an AutoOpen macro as follows:

Sub AutoOpen()
Set myDoc = ActiveDocument
If myDoc.Type = wdTypeDocument Then SetToolbar
End Sub

Public Sub SetToolbar()
Dim bBarFound As Boolean
Dim myCommandBar As CommandBar
CustomizationContext = myDoc.AttachedTemplate
bBarFound = fcnFindToolbar("Rerun")
If bBarFound = False Then
CommandBars.Add "Rerun"
With CommandBars("Rerun")
.Position = msoBarTop
.Controls.Add msoControlButton, 1
DefineControl1
.Visible = True
End With
Else
With CommandBars("Rerun")
.Position = msoBarTop
If .Controls.Count >= 1 Then
DefineControl1
Else
.Controls.Add msoControlButton, 1
DefineControl1
End If
.Visible = True
End With
myDoc.AttachedTemplate.Saved = True
End If
End Sub

And define the button on it using:

Private Sub DefineControl1()
With CommandBars("Rerun").Controls(1)
If .Type = msoControlButton Then
.FaceId = 1020
.Caption = "Rerun Template"
.Style = msoButtonIconAndCaption
.OnAction = "RerunTemplate"
End If
End With
End Sub

Then to get rid of it again, I use an AutoClose macro that looks like this:

Sub AutoClose()
RemoveToolbar
End Sub

Public Sub RemoveToolbar()
Dim bSaved As Boolean
Dim bBarFound As Boolean
bBarFound = True
bSaved = ActiveDocument.Saved
Do
bBarFound = fcnFindToolbar("Rerun")
If bBarFound = True Then CommandBars("Rerun").Delete
Loop Until bBarFound = False
If ActiveDocument.Type = wdTypeDocument Then
If bSaved = True Then ActiveDocument.Save
On Error Resume Next
ActiveDocument.AttachedTemplate.Saved = True
End If
End Sub

Private Function fcnFindToolbar(myToolbarName As String) As Boolean
Dim myValue As String
fcnFindToolbar = False
On Error Resume Next
myValue = CommandBars(myToolbarName).Name
If Err.Number = 0 Then fcnFindToolbar = True
End Function

This seems to work and will even clean up any orphans that might be left
over from any previous 'messy' processes.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Please post all follow-ups to the newsgroup.

Read the original version of this post in the Office Discussion Groups - no
membership required!


Dorak said:
I know how to open the normal.dot. Opened it, did not double click. Still
have no idea as to why customization would not stick when deleting the
toolbar. Nothing on the web either, that's why I asked here......Have a nice
holiday, and it's obviously not worth much more of anyone's time on this
subject. I did get it deleted using organizer.

Jay Freedman said:
If you double-clicked the file there, you opened a blank document based on
Normal.dot, and not Normal.dot itself. The default action for templates is
"New", not "Open".

To open Normal.dot itself, right-click the file and explicitly choose the
Open action.

The alternative (somewhat roundabout) is to use the Open command in Word's
File menu, change the "Files of type" dropdown to Word Template, (if
necessary navigate to the Templates folder), and select Normal.dot there.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
C:\Documents and Settings\[my user id]\Application
Data\Microsoft\Templates\Normal.dot



:

How did you open the template?

I actually opened normal.dot physically, and used customization to
delete the toolbar. Saved the template, closed, reopened, and
toolbar was back. The only way I could achieve the deletion was
through the Organizer. Just curious, anyway as to why.



:
Custom toolbars are stored in templates or documents. Unless you
save the template or document after deleting the toolbar, it
remains in the template or document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

CJ wrote:
Can anyone advise me why a custom toolbar can't be deleted unless
it's deleted by the Organizer? Using customization/delete
deletes the toolbar, but when restarting Word, those deleted
toolbars resurface........... I found that using the Organizer
does the trick, but why would this happen?-
 
G

Gordon Bentley-Mix on news.microsoft.com

P.S. I know my previous post provided a macro solution, which may not be
exactly what you're looking for and probably doesn't really answer your
original question, which was concerned with problems experienced using native
Word functionality. Unfortunately, I don't have an answer that's directly on
point, but if you don't mind a macro solution then perhaps my post will help
give you some direction.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Please post all follow-ups to the newsgroup.

Read the original version of this post in the Office Discussion Groups - no
membership required!


Dorak said:
I know how to open the normal.dot. Opened it, did not double click. Still
have no idea as to why customization would not stick when deleting the
toolbar. Nothing on the web either, that's why I asked here......Have a nice
holiday, and it's obviously not worth much more of anyone's time on this
subject. I did get it deleted using organizer.

Jay Freedman said:
If you double-clicked the file there, you opened a blank document based on
Normal.dot, and not Normal.dot itself. The default action for templates is
"New", not "Open".

To open Normal.dot itself, right-click the file and explicitly choose the
Open action.

The alternative (somewhat roundabout) is to use the Open command in Word's
File menu, change the "Files of type" dropdown to Word Template, (if
necessary navigate to the Templates folder), and select Normal.dot there.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
C:\Documents and Settings\[my user id]\Application
Data\Microsoft\Templates\Normal.dot



:

How did you open the template?

I actually opened normal.dot physically, and used customization to
delete the toolbar. Saved the template, closed, reopened, and
toolbar was back. The only way I could achieve the deletion was
through the Organizer. Just curious, anyway as to why.



:
Custom toolbars are stored in templates or documents. Unless you
save the template or document after deleting the toolbar, it
remains in the template or document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

CJ wrote:
Can anyone advise me why a custom toolbar can't be deleted unless
it's deleted by the Organizer? Using customization/delete
deletes the toolbar, but when restarting Word, those deleted
toolbars resurface........... I found that using the Organizer
does the trick, but why would this happen?-
 
D

Dorak

Well, Gordon thank you so much for your in depth response. Your code is
always glorious, and even though we don't seem to be able to touch on the
why, if I need this code for network purposes, I humbly accept.
You are a gem. Thanks again.

Gordon Bentley-Mix on news.microsoft.com said:
P.S. I know my previous post provided a macro solution, which may not be
exactly what you're looking for and probably doesn't really answer your
original question, which was concerned with problems experienced using native
Word functionality. Unfortunately, I don't have an answer that's directly on
point, but if you don't mind a macro solution then perhaps my post will help
give you some direction.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Please post all follow-ups to the newsgroup.

Read the original version of this post in the Office Discussion Groups - no
membership required!


Dorak said:
I know how to open the normal.dot. Opened it, did not double click. Still
have no idea as to why customization would not stick when deleting the
toolbar. Nothing on the web either, that's why I asked here......Have a nice
holiday, and it's obviously not worth much more of anyone's time on this
subject. I did get it deleted using organizer.

Jay Freedman said:
If you double-clicked the file there, you opened a blank document based on
Normal.dot, and not Normal.dot itself. The default action for templates is
"New", not "Open".

To open Normal.dot itself, right-click the file and explicitly choose the
Open action.

The alternative (somewhat roundabout) is to use the Open command in Word's
File menu, change the "Files of type" dropdown to Word Template, (if
necessary navigate to the Templates folder), and select Normal.dot there.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Dorak wrote:
C:\Documents and Settings\[my user id]\Application
Data\Microsoft\Templates\Normal.dot



:

How did you open the template?

I actually opened normal.dot physically, and used customization to
delete the toolbar. Saved the template, closed, reopened, and
toolbar was back. The only way I could achieve the deletion was
through the Organizer. Just curious, anyway as to why.



:
Custom toolbars are stored in templates or documents. Unless you
save the template or document after deleting the toolbar, it
remains in the template or document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

CJ wrote:
Can anyone advise me why a custom toolbar can't be deleted unless
it's deleted by the Organizer? Using customization/delete
deletes the toolbar, but when restarting Word, those deleted
toolbars resurface........... I found that using the Organizer
does the trick, but why would this happen?-
 
G

Gordon Bentley-Mix on news.microsoft.com

It's a pleasure to have been of service.

And as for the why, I think this might fall into the category of an
"undocumented feature" of Word - i.e. a bug ;-P.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Please post all follow-ups to the newsgroup.

Read the original version of this post in the Office Discussion Groups - no
membership required!


Dorak said:
Well, Gordon thank you so much for your in depth response. Your code is
always glorious, and even though we don't seem to be able to touch on the
why, if I need this code for network purposes, I humbly accept.
You are a gem. Thanks again.

Gordon Bentley-Mix on news.microsoft.com said:
P.S. I know my previous post provided a macro solution, which may not be
exactly what you're looking for and probably doesn't really answer your
original question, which was concerned with problems experienced using native
Word functionality. Unfortunately, I don't have an answer that's directly on
point, but if you don't mind a macro solution then perhaps my post will help
give you some direction.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Please post all follow-ups to the newsgroup.

Read the original version of this post in the Office Discussion Groups - no
membership required!


Dorak said:
I know how to open the normal.dot. Opened it, did not double click. Still
have no idea as to why customization would not stick when deleting the
toolbar. Nothing on the web either, that's why I asked here......Have a nice
holiday, and it's obviously not worth much more of anyone's time on this
subject. I did get it deleted using organizer.

:

If you double-clicked the file there, you opened a blank document based on
Normal.dot, and not Normal.dot itself. The default action for templates is
"New", not "Open".

To open Normal.dot itself, right-click the file and explicitly choose the
Open action.

The alternative (somewhat roundabout) is to use the Open command in Word's
File menu, change the "Files of type" dropdown to Word Template, (if
necessary navigate to the Templates folder), and select Normal.dot there.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Dorak wrote:
C:\Documents and Settings\[my user id]\Application
Data\Microsoft\Templates\Normal.dot



:

How did you open the template?

I actually opened normal.dot physically, and used customization to
delete the toolbar. Saved the template, closed, reopened, and
toolbar was back. The only way I could achieve the deletion was
through the Organizer. Just curious, anyway as to why.



:
Custom toolbars are stored in templates or documents. Unless you
save the template or document after deleting the toolbar, it
remains in the template or document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

CJ wrote:
Can anyone advise me why a custom toolbar can't be deleted unless
it's deleted by the Organizer? Using customization/delete
deletes the toolbar, but when restarting Word, those deleted
toolbars resurface........... I found that using the Organizer
does the trick, but why would this happen?-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top