Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2001
    Location
    NH/MA, Massachusetts, USA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add 'Drop-Downs' to my custom toolbar (2000 )

    Hello All,

    I have a template in Word 2000 that uses a custom toolbar. I would like to add a toolbar button (similar to those used for borders or font color) that has a dropdown button on it so that It could display multiple options.

    Is that even possible? Do you know how?

    Thanks
    Sean

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Add 'Drop-Downs' to my custom toolbar (2000 )

    Not quite, but you could simply add a custom menu to your toolbar. This is at the bottom of the commands categories (left window) as "New Menu" and then you would drag the "New Menu" from the right window onto your custom toolbar. Rename it to please and put your customizations on it.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    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: Add 'Drop-Downs' to my custom toolbar (2000 )

    According to the help for the CommandBarControl Type property, if you like the borders drop down, you want an "msoControlDropdown". (The colors one is an "msoControlGrid", which I didn't try because...it's late.) Your code, assuming you do this in VBA, would be something like the following:
    <pre>Sub AddDropDown()
    'Add a drop-down list to the end of the Standard toolbar
    Dim cbarDrop As CommandBarComboBox
    Set cbarDrop = CommandBars("Standard").Controls.Add(msoControlDro pdown)
    With cbarDrop
    .Caption = "Pick-A-Meal"'Not displayed; for accessing the control later
    .AddItem "Breakfast" 'ListIndex 1
    .AddItem "Lunch" 'ListIndex 2
    .AddItem "Dinner" 'ListIndex 3
    .AddItem "Snack" 'ListIndex 4
    .ListIndex = 2 'Set initial selection to Lunch
    End With
    'Now, the hard part, creating an event procedure for the control!
    End Sub</pre>

    I'll be interested to see how you link up the drop down with some functionality.

Posting Permissions

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