10 martie 2012 22:13
I am customizing a Ribbon using the Designer within VSTO 2010 for an Outlook 2010 Add-In. I am trying to add a custom group to the Home tab of the Business Manager Contacts page and to the Business Contact page of an individual Business Manager Contact.
To add a custom group into the Home and Contact Ribbon for the regular Contacts area, I set the RibbonType in the properties instpector of my OfficeRibbon to Microsoft.Outlook.Contact. Then I create two tabs and set their Tab ControlId to TabContacts (for the summary page of Contacts) and TabContact (for an individual Contact).
I am trying to figure out how to do the equivalent for the Business Manager Contacts section.
- Editat de Screener 10 martie 2012 22:42
12 martie 2012 02:41Moderator
Thanks for posting in the MSDN Forum.
It's based on my experience that we need aware of the RibbonID of BCM's table. I'm not family with BCM. I will involve some experts into this issue to see whether them can solve it. There might be some time delay, thanks for you patience.
Have a good day,
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
12 martie 2012 09:52Make sample add-in that will customize ribbon by xml means (like here:http://msdn.microsoft.com/en-us/library/bb226712(v=office.12).aspx) and set breakpoint in your GetCustomUI function. Now open up BCM page and determine in debugger what is the value of ribbonId passed as a parameter to that function. Use this in your designer in main project.
13 martie 2012 15:21
When I open a BCM contact, the GetCustomUI is calling for RibbonID Microsoft.Outlook.Contact.
I think I need the OfficeId setting for the BCM pages (Home, Contact, etc). Is there a way to identify those OfficeIds, along the lines of the sample add-in you suggested above?
13 martie 2012 15:28Could you show screenshot of page that you want to extend and describe where you want to add your info?
13 martie 2012 18:26
I would like to put my custom group at the end of the Home tab in BCM:
14 martie 2012 08:50
ribbonId you already know, now right click on ribbon on that page, click customize, add your own tab, group and drag there one of existing buttons, now click Impore/Export and export to file your customization. Open created xml file with notepad and look at insertBeforeQ or insertAfterQ properties - they will tell you name of tab that you will use in your own customization to add your controls.
14 martie 2012 12:38Good idea, but the BCM ribbons do not show up there.
14 martie 2012 12:44can you open single contact in separate window (inspector), click customize ribbon and show us screenshot of that customize window?
14 martie 2012 14:19
I get the following:
<mso:cmd app="olkaddritem" dt="1" /><mso:customUI xmlns:x1="Microsoft.BusinessSolutions.eCRM.OutlookAddIn.Connect.4" xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui"><mso:ribbon><mso:qat/><mso:tabs><mso:tab idQ="x1:TabBusinessContact"><mso:group id="mso_c2.165B8CA" label="New Group" autoScale="true"><mso:control idQ="mso:NewTaskForContact" visible="true"/></mso:group></mso:tab></mso:tabs></mso:ribbon></mso:customUI>
I tried using TabBusinessContact as the OfficeId, but my custom group does not show up. It does show up in the contacts inspector, using an OfficeId of TabContacts.
Also, I have a group called TabAddIns that shows up successfully in both the BCM contacts page and the regular contacts page (that group shows up within the ribbon's Add-Ins area).
I'm thinking that the BCM menus may delete and recreate in a fashion that eliminates my ability to add to the areas like Home, etc.
14 martie 2012 14:51
If using UI you are able to add new group or buttons to Home tab then you should also be able to do it from code. Show us your ribbon.xml that you use to customize Home tab (Microsoft.Outlook.Contact.xml most probably)
14 martie 2012 17:29
If I export the xml from the ribbon that fails to insert the tab on the home page, it looks like:
<?xml version="1.0" encoding="UTF-8"?> <customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon> <tabs> <tab idMso="TabAddIns"> <group id="Group1" label="Group1"> <labelControl id="Label1" label="Label1" /> <button id="Button1" label="Button1" showImage="false" /> </group> </tab> <tab idMso="TabBusinessContact"> <group id="Group2" label="Group1"> <labelControl id="Label2" label="Label2" /> <button id="Button2" label="Button2" showImage="false" /> </group> </tab> <tab idMso="TabContacts"> <group id="Group3" label="Group1"> <labelControl id="Label3" label="Label3" /> <button id="Button3" label="Button3" showImage="false" /> </group> </tab> <tab idMso="TabContact"> <group id="Group4" label="Group1"> <labelControl id="Label4" label="Label4" /> <button id="Button4" label="Button4" showImage="false" /> </group> </tab> <tab idMso="TabBusinessContacts"> <group id="Group5" label="Group5"> <labelControl id="Label5" label="Label5" /> <button id="Button5" label="Button5" showImage="false" /> </group> </tab> </tabs> </ribbon> </customUI>
14 martie 2012 22:36
Overall, I'm afraid that I have to say that what you are trying to do is not really supported in the grand scheme of things, on two separate grounds.
First, Microsoft provides very limited support for customizing or integrating with BCM. Supportability for developing with BCM is covered in this KB:
2300392 Support for programming with Business Contact Manager for Outlook
To my knowledge, there is no documentation on how to integrate with BCM's ribbon, so this would not be something we could support.
Also, in this case, BCM is itself an add-in that is customizing the ribbon. Ribbon extensibility was specifically designed to prevent add-in conflicts with ribbon customizations. So your end goal is unfortunately in conflict with the overall ribbon design goals.
I wish I had better news for you, but this is my understanding of Microsoft's position on these types of customization scenarios.
Bill Jacob - Microsoft Customer Service & Support - Developer Messaging
15 martie 2012 08:14So as Bill Ja said - add your own tab and be content with it ;-)
15 martie 2012 11:34Haha! Thanks to all, much appreciated.
- Editat de Screener 15 martie 2012 11:35