Display MS Office colordialog in c# Windows form

207 Views Asked by At

I have a windows form that is used as part of a Word addin written in c#.

When a button is pressed on the form I want to display the color dialog that appears when you click Font Color button on the HOME tab of the Word ribbon. I would like to display this exact dialog, but I am having great difficulty doing so.

I am aware that I can use ColorDialog clrDialog = new ColorDialog(); in c#, but this is not satisfactory as it displays a set of colors that are completely different to the ones used in the Word color dialog.

If it is not possible to display the actual Word color dialog, is it possible to extract the list of colors that appear in that dialog so that I can put them into the c# ColorDialog? I would not want a hard code solution, I would want to access the collection of colors programmatically, as the colors differ depending on the version of Word.

I would not be interested in a third party component to solve this.

Thanks in advance!

0

There are 0 best solutions below