Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CommandBars: Where's the documentation? (All)

    Where's the documentation that one is permitted to create more than one
    CommandBar with the same name in a given Context?

    It works, but dag nab it, I cannot find the documentation that might tell me
    how to distinguish between multiple CommandBars, with the same name, in a
    given context.

    How does Word distinguish between such identically named critters within the same context?
    It would seem the only distinguishing property would be the commndbars index in the commandbar collection.

  2. #2
    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: CommandBars: Where's the documentation? (All)

    Word 2002 doesn't let you do it interactively, but VBA will do it. Seems like a bug to me. Or, as this --
    <hr>If two or more custom menus or submenus have the same name, CommandBars(index) returns the first one. To ensure that you return the correct menu or submenu, locate the pop-up control that displays that menu. Then apply the CommandBar property to the pop-up control to return the command bar that represents that menu.<hr>
    -- from the VBA Help implies, VBA doesn't really parse the context carefully when you use the CommandBars collection, so it can't make sure you aren't shooting yourself in the foot.

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CommandBars: Where's the documentation? (All)


Posting Permissions

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