InvisibleApp.RegisterRibbonX Method (Visio)
Registers the IRibbonExtensibility interface that is implemented by the specified add-on to populate the custom user interface (UI).
Version Information
Version Added: Visio 2010
Syntax
expression .RegisterRibbonX(SourceAddOn, TargetDocument, TargetModes, FriendlyName)
expression A variable that represents an InvisibleApp object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
SourceAddOn |
Required |
IRibbonExtensibility |
The add-on to register. |
TargetDocument |
Required |
The document that uses the custom UI. |
|
TargetModes |
Required |
The modes in which the custom UI should be visible. See Remarks for possible values. |
|
FriendlyName |
Required |
String |
The name to associate with the UI items and errors that originate in the add-on. |
Return Value
HRESULT
Remarks
If TargetDocument is null, the custom UI is defined at the level of the application. Otherwise, Microsoft Visio binds the visibility of the custom UI to the specified document. The UI does not appear in conjunction with any other document.
TargetModes can be one or more of the following VisRibbonXModes constants.
Names |
Value |
Description |
---|---|---|
visRxModeNone |
0 |
Display the custom UI when no documents are open. |
visRxModeDrawing |
1 |
Display the custom UI in Drawing mode. |
visRxModeStencil |
2 |
Display the custom UI in Stencil mode. |
visRxModePrintPreview |
4 |
Display the custom UI in Print Preview mode. |
If FriendlyName is null, the method fails.