A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Multiple Outlook Add-in problem



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 10th 08, 07:59 PM posted to microsoft.public.outlook.program_addins
nf
external usenet poster
 
Posts: 1
Default Multiple Outlook Add-in problem

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  
Old June 12th 08, 04:45 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Multiple Outlook Add-in problem

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 08:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.