Results 1 to 11 of 11
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Tool Bar buttons unavailable (Word 97)

    I'm in the process of creating a toolbar while creating a template. I made the toolbar available to the template, added a new menu and then dropped styles into each menu group. I customized the buttons' icons, shortcut keys and name. I then Ctrl+S saved before closing out. The next time I opened the toolbar, most of the groups were unavailable (greyed). When I right-click, Customized and clicked on the group, the drop-down subjects that I had previously populated weren't visible, nor could I add anything to the group. Though, I was able to create new groups and populate them..... save, close and reopen.... everything was there. Any Idea what happened or how to retrieve, for I have many icons that I customized and would rather not redo them. Attached, I included a picture of the toolbar. All of the buttons on the left side were unavailable.... all of the buttons on the right are the newly added groups (after the mishap) and remain workable after closing and reopening. Note: not ALL of the groups became unavailable... 3 were still functionable. - Jody
    Attached Files Attached Files

  2. #2
    New Lounger
    Join Date
    Nov 2001
    Location
    Santa Ana, California, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    Nice toolbar, lots of things people use on a regular basis, good job!!!

    What you need to do is create a ".dot" file that houses the toolbar and macros. This file when complete should be placed at the following location: Crogram filesmicrosoft officeofficestartup close word and reopen it and your toolbar will remain and items will only be grayed out if not available for that document. You will also need to go to Tools, templates and add-ins and make sure your new ".dot" file is attached, just check the box and all should be well. This way if something happens to your Normal.dot file, you will not have to recreate the wheel.

    Kenneth
    <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    I had already done all of the following. The template is already a .dot and housed in my templates directory. Though, since it is a template that many people will be using, I'm attaching it to the template an not my norm.dot..... any other suggestions?

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    Not clear why this should be inconsistent. Can you trick Word into enabling the grayed menus by, in the Immediate window, doing something like this:

    CommandBars("Custom 1").Controls(1).Enabled = True

  5. #5
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    Where do I put that line of code (sorry, newby to the whole programing thing)?

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    Oh, sorry. The Immediate window is a special window in the Visual Basic Editor. Inside Word, press Alt+F11 to open the editor. Then, from the View menu, choose Immediate window (or press Ctrl+G to open the window). Anything you type in the Immediate window is executed "immediately" (immediately after you press Enter, that is). So if paste that line of code, edit the name of the toolbar, then press Enter at the end of it, it should Enable the first control on the toolbar. Or maybe it will give you an illuminating error message. Not sure what to expect given the toolbar's history of misbehavior.

  7. #7
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    Thanks... I entered the following line into the Immediate window: CommandBars(SDLC).Controls(1).Enabled = True (where SDLC is the name of the toolbar). When I hit return, I get: Runt time error '9' Subscript out of range

    I tried to attach the file, but it's too big. [img]/forums/images/smilies/sad.gif[/img]

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    Is the document still too big if you zip it?

  9. #9
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    AAAAAAA-Ha! The things our mind wont think of!
    Attached Files Attached Files

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    Very strange. I wrote a few simple macros. VBA reports that all controls on the SDLC3 toolbar are of type 10 = msoControlPopup (that is, a menu) and are enabled. The Controls property of the offending controls is not accessible. Must be some kind of corruption. I don't have the slightest idea what has happened, but the grayed-out controls are lost, I'm afraid.

    Here are the macros I used to test (note the use of quotes around SDLC3):

    Sub test2()
    Dim cbr As CommandBar
    Dim ctl As CommandBarControl
    Set cbr = CommandBars("SDLC3")
    For Each ctl In cbr.Controls
    Debug.Print ctl.Caption & " - " & ctl.Enabled & " - " & ctl.Type
    Next ctl
    End Sub

    Sub test3()
    Dim cbr As CommandBar
    Dim ctl As CommandBarPopup
    Dim citm As CommandBarControls
    Set cbr = CommandBars("SDLC3")
    Set ctl = cbr.Controls(1)
    Set citm = ctl.Controls
    End Sub

    Sorry I can't give more help.
    Regards,
    Hans

  11. #11
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tool Bar buttons unavailable (Word 97)

    I concur with Hans. If you remove then recreate those commandbar menu items, they're fine. It's possible those controls or popups referenced a macro which no longer exists.

    As Monty Python would say "Start Again!"
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •