Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Sep 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CommandBarButton (Outlook 2003 with C#)

    Hello Gurus,

    I would like to know how to add a popup button like the "NEW" button in Outlook 2003 using C#. I did add a CommandBarPopup and added CommandBarButtons under it but a CommandBarPopup doesnot support the FaceId or Icon property. I want my button to have an icon and also a dropdown of buttons.

    Can any one help!

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

    Re: CommandBarButton (Outlook 2003 with C#)

    As far as I know, this is not possible - as you note, the CommandBarPopup object doesn't expose the properties needed to set an icon. Obviously, the developers inside Microsoft have a much richer feature set at their disposal, there are several types of command bar controls that are used in the Office applications that cannot be created by end users/programmers at all. Here is the list of command bar control types from the Office XP help, there may be more in Office 2003. The ones marked with * are the only ones available to programmers:

    msoControlActiveX
    msoControlAutoCompleteCombo
    msoControlButton *
    msoControlButtonDropdown
    msoControlButtonPopup
    msoControlComboBox *
    msoControlCustom
    msoControlDropdown *
    msoControlEdit *
    msoControlExpandingGrid
    msoControlGauge
    msoControlGenericDropdown
    msoControlGraphicCombo
    msoControlGraphicDropdown
    msoControlGraphicPopup
    msoControlGrid
    msoControlLabel
    msoControlLabelEx
    msoControlOCXDropdown
    msoControlPane
    msoControlPopup *
    msoControlSpinner
    msoControlSplitButtonMRUPopup
    msoControlSplitButtonPopup
    msoControlSplitDropdown
    msoControlSplitExpandingGrid
    msoControlWorkPane

  3. #3
    New Lounger
    Join Date
    Sep 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CommandBarButton (Outlook 2003 with C#)

    I don't understand what Microsoft is doing? Why expose all these interfaces if we can't use them? I was sorta hoping that I would be able to use the msoControlButtonPopup or the msoControlButtonDropdownm controls! Have been trying like crazy for the past 13 hours!

    Well thanks HansV! If you get anything on this topic, please inform me! And could you give me the site where you got this info! Would like to check it first hand!

    Thanks.

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

    Re: CommandBarButton (Outlook 2003 with C#)

    The list of existing types is from the online help for the Type property of the CommandBarControl object, and the list of available types from the help for the Add method of the CommandBarControls object. The reason for exposing the list of all existing types, even those you can't create yourself, is to make it possible to loop through all controls in a command bar and to test their type.

  5. #5
    New Lounger
    Join Date
    Sep 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CommandBarButton (Outlook 2003 with C#)

    Could you tell me what type of control the "NEW" button is?

    And thanks for the prompt reply!

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

    Re: CommandBarButton (Outlook 2003 with C#)

    If you type

    ? ActiveExplorer.CommandBars("Standard").Controls(1) .Type

    in the Immediate window in the Visual Basic Explorer and press enter, the result will be 13 (in Outlook 2002). This is the numeric value of msoControlSplitButtonPopup - not one of the types you can create yourself.

Posting Permissions

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