new menu doesn't operate correctly in Word 2000 or 2003 like 97

N

newbie

I have a new menu configured on the top menu bar with 2 new menu selections.
The first selection has a list of choices/macros that use select cases to
populate the 2nd new menu selection with various toolbar choices. The view-
toolbars has been disabled for our users. This has worked for the last 5
years in Word 97 but we are migrating to Word 2000 and Word 2003 and it
doesn't seem to work. Can someone please point me in the right direction to
get this working. I have included a macro with a modified select case
statement that I am useing The 2nd new menu doesn't get populated at all. If
I add .visible =true the toolbars show up as floating toolbars which is not
what we want. The prefered way is to have the toolbars displayed just like
they are with the view toolbars but in the 2nd new menu area.

Thanks for any help in advance,


Public Sub ShowTbarGeneric()


' STANDARD TOOLBARS
'
Dim myCB As CommandBar
For Each myCB In CommandBars
If myCB.Type = msoBarTypeNormal Then
Select Case myCB.Name
' Standard Word Menus - ON
Case "Database", "AutoText", "Forms", "Picture", "WordArt",
"Reviewing", "Tables and Borders", "Visual Basic", "Control Toolbox"
myCB.Enabled = True
' Standard Word Menus - ON
Case "Standard", "Formatting", "Drawing"
myCB.Enabled = True
' Group1Tools
Case "G1toolbar1", "G1toolbar2",
"G1toolbar3", "G1toolbar4"
myCB.Enabled = False
' Group2 Tools
Case "g2toolbar1", "g2toolbar2",
myCB.Enabled = False
' Group 3 Tools
Case "G3toolbar1", "G3toolbar2", "G3toolbar3"
myCB.Enabled = False
' Group 4 Tools
Case "G4toolbar1", "g4toolbar2", "G4toolbar3"
myCB.Enabled = False
' Otherwise
Case Else
myCB.Enabled = True
End Select
End If
Next myCB
End Sub
 
A

Al Borges

Hi newbie:

The most likely problem lies in your references, which have changed on
switching MS Word versions.

In order to program with command bars in Word 2000, you must set a reference
to the Microsoft Office 9.0 Object Library. To do so follow these steps: 1.
While in the Visual Basic Editor, on the Tools then References.
2. In the References dialog box, click to select Microsoft Office 9.0
Object Library.


For more info, go to
http://support.microsoft.com/default.aspx?scid=kb;en-us;209974

Regards,
AL

(check out my free MS Word EMR Project, downloadable at
http://www.emrupdate.com/freestuff/alborgesmd.aspx)
 

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