There is no way to force Office applications invoke the GetCustomUI callback. If you need to keep your custom ribbon UI hidden at startup by default you can use the getVisible
callback for the ribbon controls, including tabs, and when required you may call the IRibbonUI.Invalidate
to get your controls callback invoked, so you could return an appropriate value and get your controls appeared on the ribbon.
For example, if an add-in writer implements the getVisible
callback procedure for a button, the function is called once, the state loads, and then if the state needs to be updated, the cached state is used instead of recalling the procedure. This process remains in place until the add-in signals that the cached values are invalid by using the Invalidate
method, at which time, the callback procedure is again called and the return response is cached. The add-in can then force an immediate update of the UI by calling the Refresh
method.