![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I developed an outlook add-in using VS 2005. The add-in adds a new menu item (QB) in the Menu Bar by adding a CommanBarPopup to the Menu Bar.I get a count of all controls in the Menu Bar Command Bar and add the new menu at position = count + 1. Everything works fine. The problem occurs when there are multiple add-Ons installed. and those add-ins also add a new menu item in the menu bar at the end. In such case only one menu item is displayed. Either mine or the other add- ons. Both dont get shown at one time. Can anybody please help me. My code is as follow Dim objCmdBar As CommandBar = applicationObject.ActiveExplorer().CommandBars("Me nu Bar") objCmdBar.Reset() Dim objCommandBarPopup As CommandBarPopup 'used for adding the 'QB' Popup menu to main menu bar in outlook Dim objMainCmdBarControl As CommandBarControl 'used for adding new controls to 'QB' PopUp Menu Dim position As Integer 'Add a new pop up menu 'QB' to Menu Bar Try objCommandBarPopup = CType(objCmdBar.Controls("QB"), CommandBarPopup) Catch ex As SystemException position = objCmdBar.Controls.Count + 1 objCommandBarPopup = CType(objCmdBar.Controls.Add(MsoControlType.msoCon trolPopup, Missing.Value, Missing.Value, position, True), CommandBarPopup) objCommandBarPopup.Caption = "QB" End Try 'Adding the CommandBar buttons to the QB Menu With objCommandBarPopup .Visible = True .Tag = "QB" objMainCmdBarControl = .Controls.Add(MsoControlType.msoControlButton, Missing.Value, Missing.Value, Missing.Value, Missing.Value) Login = CType(objMainCmdBarControl, CommandBarButton) With Login .Caption = "Login" '.Tag = "Login" .Visible = True End With End with |
Ads |
#2
|
|||
|
|||
![]()
If you don't set position the control will be added at the end of the
toolbar no matter how many other addins add their controls to that toolbar. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "nf" wrote in message ... Hi, I developed an outlook add-in using VS 2005. The add-in adds a new menu item (QB) in the Menu Bar by adding a CommanBarPopup to the Menu Bar.I get a count of all controls in the Menu Bar Command Bar and add the new menu at position = count + 1. Everything works fine. The problem occurs when there are multiple add-Ons installed. and those add-ins also add a new menu item in the menu bar at the end. In such case only one menu item is displayed. Either mine or the other add- ons. Both dont get shown at one time. Can anybody please help me. My code is as follow Dim objCmdBar As CommandBar = applicationObject.ActiveExplorer().CommandBars("Me nu Bar") objCmdBar.Reset() Dim objCommandBarPopup As CommandBarPopup 'used for adding the 'QB' Popup menu to main menu bar in outlook Dim objMainCmdBarControl As CommandBarControl 'used for adding new controls to 'QB' PopUp Menu Dim position As Integer 'Add a new pop up menu 'QB' to Menu Bar Try objCommandBarPopup = CType(objCmdBar.Controls("QB"), CommandBarPopup) Catch ex As SystemException position = objCmdBar.Controls.Count + 1 objCommandBarPopup = CType(objCmdBar.Controls.Add(MsoControlType.msoCon trolPopup, Missing.Value, Missing.Value, position, True), CommandBarPopup) objCommandBarPopup.Caption = "QB" End Try 'Adding the CommandBar buttons to the QB Menu With objCommandBarPopup .Visible = True .Tag = "QB" objMainCmdBarControl = .Controls.Add(MsoControlType.msoControlButton, Missing.Value, Missing.Value, Missing.Value, Missing.Value) Login = CType(objMainCmdBarControl, CommandBarButton) With Login .Caption = "Login" '.Tag = "Login" .Visible = True End With End with |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple Progiles in Outlook 2K3 problem | Tony[_2_] | Outlook - General Queries | 2 | May 6th 08 08:26 PM |
I have a problem with multiple versions of contacts in Outlook | TM | Outlook - Using Contacts | 2 | June 4th 07 03:43 PM |
Problem - Multiple sessions of outlook open at the same time | James | Outlook - General Queries | 7 | April 25th 06 04:17 PM |
Multiple signatures problem in outlook 2003 | John | Outlook - General Queries | 2 | January 13th 06 01:38 PM |
Multiple signatures problem in outlook 2003 | John | Outlook and VBA | 2 | January 13th 06 01:38 PM |