PDA

View Full Version : [SOLVED:] TextHighlightColor - control, button, gallery, whatever ...



RandomGerman
01-13-2022, 01:52 AM
Hi all,

it seems ridiculous, but I'm not able to get TextHighlightColor into my selfmade addin.

I tried
<control idMso="TextHighlightColorPicker" enabled="true"/>
<control idMso="TextHighlightColor" enabled="true"/>
<button idMso="TextHighlightColorPicker" enabled="true"/>
<button idMso="TextHighlightColor" enabled="true"/>
<gallery idMso="TextHighlightColorGallery" enabled="true"/>
<gallery idMso="TextHighlightColor" enabled="true"/>

None of these worked and I wasn't able to find it via google, as all lists of controls I found were too old to have this relative new function included.

Does anybody know the solution?

Thanks in advance,
RG

arnelgp
01-13-2022, 05:10 AM
it's a gallery and will only be Enabled when your Textbox is in Rich Textbox format:

<gallery idMso="TextHighlightColorPicker" size="large" label="Hilite" />

Paul_Hossler
01-13-2022, 04:53 PM
too old to have this relative new function included.

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwiN58z28K_1AhUWk4kEHQaICq4QFnoECBEQAQ&url=https%3A%2F%2Finteroperability.blob.core.windows.net%2Ffiles%2FMS-CUSTOMUI%2F%255BMS-CUSTOMUI%255D-180828.docx&usg=AOvVaw0CjOtBTQyI2fOHh6bLRcnc

The 2018 version has TextHighlightColorPicker

29307


I tried to just attach the docx, but it's too large

I tried to just include the URL of the docx, but Google kept interjecting and I couldn't figure it out

Try Googling to get

29306

arnelgp
01-13-2022, 09:08 PM
this is but a demo (MS Access).
on ribbon you will see a custom tab (My Tab).
TextHighlighColor gallery is Named as "Hilite".
The textbox Text Format is Rich Text.

RandomGerman
01-14-2022, 02:37 AM
Thank you so much, both of you. Unfortunately I cannot open MS Access to have a look on you example, don't have it installed, and I think I don't get the point with the rich text format.

I copied your code,
<gallery idMso="TextHighlightColorPicker" size="large" label="Hilite" />
but it did not make the button visible on my self-made ppam-ribbon, while the function is there and works on the home ribbon, so it shouldn't be a problem with the selected textbox, if I get that point right. I can highlight texts with the gallery on the Home ribbon, but I don't get the gallery visible on my own ribbon.
As the problem is usually in front of the computer, I guess I'm still doing something wrong, but at the moment I have no idea what. Do you have?

@Paul: Your google link does work!

arnelgp
01-14-2022, 02:44 AM
What do you have? Excel or word?

Paul_Hossler
01-14-2022, 06:12 AM
Thank you so much, both of you. Unfortunately I cannot open MS Access to have a look on you example, don't have it installed, and I think I don't get the point with the rich text format.

@Paul: Your google link does work!

1. Good

2. I think / guess (bold, underlined) that the control.id should be "TextHighlightColorPickerLicensed"

Here's PP example that uses Options, Customize the Ribbon to find the control.id by hovering over the msoId and using the part in parens as the control.id

(at least I think that's the way it works; I couldn't find my old reference)


Edit -- I did find a reference

https://www.add-in-express.com/docs/net-ribbon-tips.php

arnelgp
01-14-2022, 06:44 AM
this is a sample for Excel and Word
goto Home tab, then Farthest right Group.

RandomGerman
01-17-2022, 01:28 AM
2. I think / guess (bold, underlined) that the control.id should be "TextHighlightColorPickerLicensed"

That one works, with gallery idMSO.

Might be a little but tricky difference between Word and PowerPoint, as I can confirm, that arnelgp's 1.docx does work very well without the "Licensed" in the end of the control.id. ;-)

Thank you both for your great effort in finding solutions. That is priceless, over and over again and I appreciate it very much.