Protected Overrides Function CreateRibbonExtensibilityObject() As Microsoft.Office.Core.IRibbonExtensibility
    If myCondition = True Then
        Return Globals.Factory.GetRibbonFactory().CreateRibbonManager (New Microsoft.Office.Tools.Ribbon.IRibbonExtension() {New Ribbon1()})
    Else
        Return Globals.Factory.GetRibbonFactory().CreateRibbonManager (New Microsoft.Office.Tools.Ribbon.IRibbonExtension() {New Ribbon2()})
    End If
End Function
