View Single Post
 
Old Yesterday, 05:27 AM
Italophile Italophile is offline Windows 11 Office 2021
Expert
 
Join Date: Mar 2022
Posts: 559
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Not something I've tried before so gave it a whirl.

Added the code below to a new template:
Code:
<customUI  
	xmlns="http://schemas.microsoft.com/office/2009/07/customui" 
    xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui" >
	<ribbon >
		<tabs >
			<tab id="newTab" >
				<group id="newGroup" >
				    <mso:gallery idQ="mso:TextHighlightColorPicker" showInRibbon="false" visible="true"/>
				</group >
			</tab >
		</tabs >
	</ribbon >
</customUI >
Although this results in an error on load the gallery gets added anyway.
Screenshot 2025-10-29 122254.png
EDIT: It is the parameter "showInRibbon="false" " that creates the error

The top half of the button applies the current highlight color, the bottom half displays the standard gallery.
Screenshot 2025-10-29 122341.png
Double clicking also seems to work, but only after displaying the gallery to set the highlight color.
Hope that helps.

EDIT 2: Attached template contains my working example. Although a dotm there is no code.
Attached Files
File Type: dotm Guessed Test.dotm (15.1 KB, 1 views)

Last edited by Italophile; Yesterday at 11:30 AM. Reason: Add example template
Reply With Quote