Get rid of legacy 2003 custom toolbars in 2007

B

Buck Jeppson

I have a Word 2003 template for which I created a custom toolbar with 5
buttons. The client migrated to 2007, so I did as well. Some of the buttons
don't work. I want to either delete some buttons or the entire toolbar but I
can't figure out how. Someone please help. I'm near bridge jumping.
 
D

Doug Robbins - Word MVP

I am thinking that if you use File>Open to open the template and then save
it in either dotx (or dotm if it has macros that you still need) format, the
toolbars may be deleted from it.

Alternatively, if you still have access to Word 2003, you could open the
template in that version to modify it.

See the following page of fellow MVP Graham Mayor's website for tips on
running both versions on the one machine.

http://www.gmayor.com/Toolbars_in_word_2007.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
B

Buck Jeppson

That's the problem. I open the template but I can't figure out how to delete
the old toolbar. Is there a way to delete a toolbar?

I don't have Word 2003 any more, so I can't delete it from the original
template and then rebuild.
 
B

bryan s

Try this:
To remove it, open the template in Word, open the Immediate window in the
VBA editor, and enter this command:
ActiveDocument.CommandBars("button1").Delete

ActiveDocument.CommandBars("button2").Delete

etc.

Press Enter at the end of it, and then save the template.
 
G

Greg Maxey

Sub ScratchMaco()
Dim oCB As CommandBar
Dim oCBC As CommandBarControl
Set oCB = Application.CommandBars("Custom 1") 'Use your custom toolbar name.
oCB.Delete 'If you want to delete the toolbar
'Or
oCB.Controls(1).Delete 'Indexed control (i.e., the first control on the
toolbar)
'Or
For Each oCBC In oCB.Controls
If oCBC.Caption = "&New..." Then oCBC.Delete 'Delete by control caption
using your assigned captions.
Next
End Sub
 
R

Roderick O'Regan

If I can remember correctly, when one opens a .dot file in Word 2007,
any toolbars you have created get added to the Add-ins tab on the
ribbon.

It's then just a question of right clicking on the toolbar located in
the add-in and selecting the command to delete it.

Then save it as a .dotm

....or something like that...
 
D

Doug Robbins - Word MVP

Your memory is good. Great tip.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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