Outlook AdxRibbonMenuSeparator Appearance

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

Only registered users are allowed to subscribe.
Outlook AdxRibbonMenuSeparator Appearance
 
Nick Williams




Posts: 8
Joined: 2018-03-03
Hello,

How can I make the Separator of the ribbon context menu (on mail item) appear as it does when displayed from a ribbon menu? What I need is the large separator with the caption. This is possible using in a VSTO add-in using xml to provide the context menu contents, but how can I achieve this with Add-in Express?

Thanks
Nick
Posted 03 Mar, 2018 08:06:41 Top
Andrei Smolin


Add-in Express team


Posts: 15086
Joined: 2006-05-11
Hello Nick,

Set a non-empty string to ADXRibbonMenuSeparator.Caption.

PS. A very nice picture. A girl or a boy? Name? Still young?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Mar, 2018 03:42:11 Top
Nick Williams




Posts: 8
Joined: 2018-03-03
Hi Andrei,

I am already setting the ADXRibbonMenuSeparator.Caption. The menu is dynamic, and I have the same OnCreate event handler assigned for the menu on the ribbon and the context menu. The menu from the ribbon appears as I want it, but the context menu just shows a ------------ dashed line.

'add Advanced Separator
ribMnuSeparator = New ADXRibbonMenuSeparator(components)
ribMnuSeparator.Caption = "Advanced"
ribMnuSeparator.Id = "ribMnuSeparatorAdvancedLocations"
ribMnuSeparator.Ribbons = ADXRibbons.msrOutlookExplorer
e.AddControl(ribMnuSeparator)

I am testing in Outlook 2010.

PS. Thanks for the complement on the picture of Fred, boy. The picture is about 6 years old now, making him almost 7 years (49 in dog years). I also have his brother Ernie. :-)

Thanks
Nick
Posted 05 Mar, 2018 04:11:53 Top
Andrei Smolin


Add-in Express team


Posts: 15086
Joined: 2006-05-11
Nick,

I reproduce the issue in Excel 2016. This is by design: the Ribbon schema contains the following description of Ribbon controls available for a context menu:

	<xsd:group name="EG_ContextMenuControls">
		<xsd:choice>
			<xsd:element name="control" type="CT_ControlCloneRegular" />
			<xsd:element name="button" type="CT_ButtonRegular" />
			<xsd:element name="checkBox" type="CT_CheckBox" />
			<xsd:element name="gallery" type="CT_GalleryRegular" />
			<xsd:element name="toggleButton" type="CT_ToggleButtonRegular" />
			<xsd:element name="splitButton" type="CT_SplitButtonRegular" />
			<xsd:element name="menu" type="CT_MenuRegular" />
			<xsd:element name="dynamicMenu" type="CT_DynamicMenuRegular" />
			<xsd:element name="menuSeparator" type="CT_MenuSeparatorNoTitle" />
		</xsd:choice>
	</xsd:group>


Although this doesn't directly prevents a separator form showing a title when in a submenu, this is a hint: you know that the XSD schema cannot describe all scenarios.

PS. Mine is a black Labrador girl called Lou. Grey muzzle; almost 10 years. A great lover of water. We walked on the frozen surface of a nearby lake with several other dogs: she finds an ice hole and swims in it and its minus 15-20 C outside! No one's swimming of course. Or, at autumn, she found a wheel track full of dirty water, the next moment she is in it, brown with the mud to the tail. Very friendly. Like all Labs. You know.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Mar, 2018 05:56:10 Top
Nick Williams




Posts: 8
Joined: 2018-03-03
Hi Andrei,

So is there no way to force the context menu to show the Separators with a caption in Addin Express? As this is functionality we would really like. I have another add-in that has this functionality developed using VSTO. Am I able to still use the VSTO method by providing dynamically created XML while using Addin Express? Or if there another method you can recommend to achieve the desired result?

Wow -15 to -20. Mine won't even go outside if it is raining :-s

Thanks
Nick
Posted 05 Mar, 2018 06:10:40 Top
Andrei Smolin


Add-in Express team


Posts: 15086
Joined: 2006-05-11
There's no way to force. Could you please show the XML that you pass when creating the dynamic menu in VSTO?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Mar, 2018 09:02:42 Top
Nick Williams




Posts: 8
Joined: 2018-03-03
Hi Andrei,

I have literally just tested this, and it appears the same from the ribbon and from a context menu. e.g. the separators have captions (titles).

<?xml version="1.0"?>
<menu xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<menuSeparator title="Separator 1" id="Separator1"/>
<button id="Button1" image="ButtonImage" onAction="OnClickEvent" label="Button Title"/>
<menuSeparator title="Separator 2" id="Separator2"/>
<button id="Button2" image="ButtonImage" onAction="OnClickEvent" label="Button Title"/>
</menu>


How can I get the same result in Add-in Express?

Thanks
Nick
Posted 05 Mar, 2018 09:31:53 Top
Nick Williams




Posts: 8
Joined: 2018-03-03
This MSDN page says the "Menu separators can optionally have title strings, which SHOULD display as headers in the menu".
Posted 05 Mar, 2018 09:49:24 Top
Andrei Smolin


Add-in Express team


Posts: 15086
Joined: 2006-05-11
Thank you, Nick. I'll return back to you tomorrow. Looks like we ignore the caption for some reason.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Mar, 2018 09:54:16 Top
Nick Williams




Posts: 8
Joined: 2018-03-03
Hi Andrei,

If I hadn't already achieved the desired result in VSTO, I would be none the wiser. Hopefully I can achieve the same result in Add-in Express as it is proving much easier than working directly with the XML for ribbons and menus etc.

Thanks for your help so far, have a good evening.

Regards
Nick
Posted 05 Mar, 2018 10:01:32 Top