onLoad Event
This event can be hooked up at design-time or at run-time
Ribbon.xml
<customUI xlmns="schemas.microsoft.com/office/2009/07/customui">
onLoad="Ribbon_OnLoad"
<ribbon>
<commands>
Ribbon.cs
' C#
internal class Ribbon
{
public static void Ribbon_OnLoad(Microsoft.Office.Core.IRibbonUI ribbonUI)
{
// keep a reference to you can refresh the ribbon at run-time
this.ribbon = ribbonUI
}
}
At Runtime
' C#
public void Ribbon_Load(object sender,
RibbonControlEventArgs e)
{
}
this.Load += new Microsoft.Office.Tools.Ribbon.RibbonUIEventHandler(this.Ribbon_Load);
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext