Trouble getting a RibbonTab --> RibbonGroup --> RibbonMenu in Outlook 2013

Add-in Express™ Support Service
That's what is more important than anything else

Trouble getting a RibbonTab --> RibbonGroup --> RibbonMenu in Outlook 2013
I need to get a RibbonMenu (in it's own group) in the TabContacts of Outlookm 2013. 
Barry O'Neill




Posts: 20
Joined: 2015-12-16
Hi,

I need to get a RibbonMenu (in it's own group) in the TabContacts of Outlookm 2013.
I need it to appear after the GroupCommunicate.

This is the setup:

ADXRibbonTab: IdMso = TabContacts, Ribbons = OutlookContact
ADXRibbonGroup: InsertAfterMso = GroupCommunicate, Ribbons = OutlookContact
ADXRibbonMenu: InsertAfterMso = GroupCommunicate, Ribbons = OutlookContact

....it's not showing up anywhere, so I assume one of the above settings is off.

Please advise, and thanks !
Posted 12 Jan, 2016 11:29:44 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Barry,

Barry O'Neill writes:
ADXRibbonMenu: InsertAfterMso = GroupCommunicate, Ribbons = OutlookContact


Set InsertAfterMso="". Make sure that you have the "Show add-in user interface errors" flag checked; see section "Get Informed about Errors in Ribbon markup" in the PDF file in the folder {Add-in Express}\Docs on your development PC.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Jan, 2016 01:26:30 Top
Barry O'Neill




Posts: 20
Joined: 2015-12-16
Thanks for the tips. Turning on "Show add-in user interface errors" is helping to zero in on the problem(s). My control was a clone of another and it complained about having the same ID, so I changed it and now that error is gone, but there is another: "required attribute 'getContent' is missing"....any idea what that is about ?

Thanks,

Barry
Posted 13 Jan, 2016 10:48:09 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Please post here or send to the support email address the Ribbon XML generated by your add-in. To get the XML, in the OnRibbonBeforeLoad event, use Clipboard.SetText(e.Xml) and then paste the XML.


Andrei Smolin
Add-in Express Team Leader
Posted 13 Jan, 2016 11:02:03 Top
Barry O'Neill




Posts: 20
Joined: 2015-12-16
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="ribbonLoaded_Callback" loadImage="getImages_Callback">
<commands>
<command getEnabled="getEnabled_Callback" idMso="Call" onAction="onActionCommonRepurposed_Callback" />
<command getEnabled="getEnabled_Callback" idMso="DialMenu" onAction="onActionCommonRepurposed_Callback" />
</commands>
<ribbon startFromScratch="false">
<tabs>
<tab getVisible="getVisible_Callback" idMso="TabContact">
<group centerVertically="true" id="adxRibbonGroup_9b5dc6350c6a43d2af16939a43383d22" insertAfterMso="GroupCommunicate" label="OS Phone" visible="true">
<dynamicMenu getContent="getContent_Callback" getDescription="getDescription_Callback" getEnabled="getEnabled_Callback" getImage="getImage_Callback" getKeytip="getKeytip_Callback" getLabel="getLabel_Callback" getScreentip="getScreenTip_Callback" getShowImage="getShowImage_Callback" getShowLabel="getShowLabel_Callback" getSize="getSize_Callback" getSupertip="getSuperTip_Callback" getVisible="getVisible_Callback" id="adxRibbonMenu_0348aa27a2b64c8f83d16f577440907d" invalidateContentOnDrop="true" />
</group>
</tab>
<tab getVisible="getVisible_Callback" idMso="TabContacts">
<group centerVertically="true" id="adxRibbonGroup_9b5dc6350c6a43d2af16939a43383d23" insertAfterMso="GroupCommunicate" label="OS Phone" visible="true">
<dynamicMenu idMso="TabContacts" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Posted 13 Jan, 2016 11:12:01 Top
Barry O'Neill




Posts: 20
Joined: 2015-12-16
FYI...the XML from above is based on a RibbonTab/Group/Menu that works fine in Office 2007/10.....it's failing when loaded in Office 2013.

I created a second one in my AddinModule design space that I've been tinkering with to get to work in Office 2013. It's pretty much a clone of the first one, but now has changed Id's (which was a mistake by letting it keep the same ones as the source after I pasted it), and it also references IdMso "TabContacts" in the RibbonTab, as the name seems to have changed in Office 2013, from what I can tell from the Outlook code spreadsheets for 2013.

Anyway, the above works in Outlook 2007/10...
Posted 13 Jan, 2016 11:28:33 Top
Barry O'Neill




Posts: 20
Joined: 2015-12-16
(I have neither of my two working in Outlook 2013 though :-(

For 2013 I need it both the main ribbon of the Contacts tab, as well as the opened window for a Contact, and it's ribbon there. I assume two sets of controls will be required, since they are separate locations. Please advise, and thanks....Barry
Posted 13 Jan, 2016 11:34:54 Top
Barry O'Neill




Posts: 20
Joined: 2015-12-16
Update....after turning on the debugging in Outlook, I was shown the error of my ways with a couple of things. As such, I do have it working now within an open Contact window in Outlook 2013.

However, I still need to get the same functionality in the main windows ribbon, when the contact tab is selected. So all the contacts are listed, and the same button in the top ribbon for Outlook 2013.

Thanks for your help thus far !

Please advise,

Barry
Posted 13 Jan, 2016 15:09:53 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Barry,

You need to use two tab components containing the "same" controls; still, that tab components must have different values in the Ribbons and IdMso properties; the controls must have different Id properties.

Explorer window:
Tab: Ribbons=OutlookExplorer IdMso=Tabcontacts

Inspector:
Tab: Ribbons=OutlookContact IdMso=TabContact

Barry O'Neill writes:
<dynamicMenu idMso="TabContacts" />


This isn't correct: TabContacts is the IdMso of a built-in *tab*; it cannot be used on a dynamic menu.

Here's how I handle the Oncreate event of the dynamic menu:


ADXRibbonButton newButton = null;
private void adxRibbonMenu1_OnCreate(object sender, ADXRibbonCreateMenuEventArgs e)
{

    e.Clear(); // this removes exisiting controls

    newButton = new ADXRibbonButton(this.components);
    newButton.Caption = "Created at " + System.DateTime.Now.ToLongTimeString();
    newButton.Id = "newButton";
    newButton.ImageTransparentColor = System.Drawing.Color.Transparent;
    newButton.Ribbons = ADXRibbons.msrOutlookExplorer; // specify a required Ribbon(s) here
    newButton.OnClick += new ADXRibbonOnAction_EventHandler(button_OnClick);
    e.AddControl(newButton);
}

private void button_OnClick(object sender, IRibbonControl control, bool pressed)
{
    // use a control's ID to identify it
    System.Windows.Forms.MessageBox.Show(control.Id);
} 



Andrei Smolin
Add-in Express Team Leader
Posted 14 Jan, 2016 10:11:30 Top
Barry O'Neill




Posts: 20
Joined: 2015-12-16
I'm all fixed up !....Thank you for your assistance !

Regards from Ottawa (GMT -5)
Posted 15 Jan, 2016 09:54:55 Top