Creating your own custom RibbonControl type in Word VSTO - vsto

I have created a Word VSTO add-in. I would like to create a custom RibbonControl type in my add-in Ribbon, to show information to the users. It would only be text.
I have tried using "Label" or "EditBox" to the purpose, but it looks awful. I have also tried creating a custom control and implement the RibbonControl interface but it doesn't work.
I have used the designer way to create the ribbon. Can the XML method be used and how?
I have googled for hours and I am not sure that is is possible at all. Any clues?

No, you cannot create your own custom ribbon controls, you are limited to the built-in controls.

Related

VSTO Addin - Own button type like "ShapeWidth" and "ShapeHeight"

I am currently working on an PowerPoint Addin and I am currently finishing the Ribbon. I'd like to create a control to change the size of objects that looks similar to the inbuild button "ShapeWidth" and "ShapeHeight":
However, I couldn't find the correct control type and hence I built the below by myself using an editbox and buttons. Although it's working I find the other style way cleaner but I haven't found the correct type.
Not all Ribbon X (Office Fluent UI) control types that Microsoft uses in its Office applications are made available to third-party developers. This, I'm afraid, falls into that category.
You should probably be able to get the image, at least, by specifying the idMso for the built-in control.

How put custom icon to Visio Document for custom ribbon

I am trying to put custom icon to Visio Document for custom ribbon. When I using Excel I can use utility “Custom UI Editor for Microsoft Office”. For example, I can write next xml in utility and insert some picture:
Custom UI Editor
In Excel all working excellent.
But when I trying use this way in Visio, I don’t see picture on ribbon when I opening Visio-document.
After that I opening “Custom UI Editor for Microsoft Office” for Visio-document I also don’t see inserted picture that I inserted before.
Custom UI Editor after opening Visio-document
Can anyone help me out with my problem? Thank you.
This is a known issue in Visio. Custom icons in .vsdx file simply do not work.
If you are really determined to have custom pictures, you should do it otherwise.
Like via VBA macro, by writing a callback, i.e. instead of image specifying getImage pointing to some callback function to get the custom image. Or even by creating a full-blown extension.
Note - Microsoft-defined (idMso) images work fine.

Replacing several winforms controls with custom controls in VS2010

I have inherited a VB.net project, and I need to give several ListBoxes some custom functionality. So I've created a subclass of System.Windows.Forms.ListBox, and now I'd like to replace several "regular" ListBoxes with my subclass.
I want to be extremely careful not to change any properties that are set in the designer, so I'm hoping to just "drop in" my replacement.
Does the VS2010 winforms designer have a built-in way of simply changing the user control's type, without deleting and re-inserting the control?
You will need to change the type in the Form.designer.vb file. Every control used on the form is declared in there.
In my experience it will be best to use the Visual Studio find and replace tool to replace the ListBox control where you need to in all the .ASPX files as well as the .designer.cs files.
You'll need to add a reference to your control's assembly in the .ASPX files too.

Excel VBA: How to turn code into a full on toolbar tool? [duplicate]

I am in the process of creating a VBA add-in for Excel 2010, and I used the "Custom UI Editor for Microsoft Office" tool to create my own ribbon.
However, I would like to give the user the option to load my add-in without displaying the ribbon, or with different parts of the ribbon visible.
With menus, I know you can completely control them programmatically, but ribbons seem to work differently.
Is there a way in VBA to not load my customUI.xml ribbon tabs on startup?
Is there a way to remove items from (or add items to) these tabs at runtime?
here is a whole slew of help on this subject Awesome Ribbon Help. I think points 2 and 3 are of particular interest to you.

Using Label property of Office Ribbon Control in vba

Is there a way to read/get the Label attribute of an Office 2007/2010 ribbon control in VBA? The only exposed properties appear to be Tag, ID, and Context.
I'm trying to use the getLabel and getVisible callbacks together--read the label and determine whether or not to show a control. I tried setting the Tag property in the getLabel callback, but the code won't compile as that property is read-only by then.
Any other suggestions for how to skin this cat welcome. Note that I cannot use a dynamic menu; this is under a split button, and has to stay there. Thanks in advance.
I suspect that VBA doesn't have access to customize the Ribbon UI. I do know for a fact that this can be handled with VSTO.