Upravit

Sdílet prostřednictvím


Application.RegisterRibbonX method (Visio)

Registers the IRibbonExtensibility interface that is implemented by the specified add-on to populate the custom user interface (UI).

Syntax

expression.RegisterRibbonX (SourceAddOn, TargetDocument, TargetModes, FriendlyName)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
SourceAddOn Required IRibbonExtensibility The add-on to register.
TargetDocument Required Document The document that uses the custom UI.
TargetModes Required VisRibbonXModes 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

Nothing

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.

Name 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.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.