Com Add-In Modifying RIbbon in 2007?
I have no idea about C# but as no one has answered your question - in VB6 it
would be something like this
' connect module
Implements IRibbonExtensibility
Public Function IRibbonExtensibility_GetCustomUI(ByVal RibbonID As String)
As String
' fires after the OnConnection event
IRibbonExtensibility_GetCustomUI = RibbonXML-string
' where the xml is read from say file or resource
End Function
and the calback
Public Function MyButton(ByVal control As Office.IRibbonControl)
Select case control.Id
case "macro1": Call macro1
End Select
End Sub
in the ribbon xml
<button id="macro1" etc etc onAction="MyButton" /
Regards,
Peter T
"Matthew Wieder" wrote in message
...
We have a Com Add-In (C#) that works nicely in Excel 2003 and 2007, but in
2007 the commandbar buttons all get grouped into the Add-Ins Ribbon. We
want
to be able to create our own Ribbon with a more native 2007 look/feel.
The sites that I have seen discuss customizing the ribbon for 2007 show
how
to do it manually, but I haven't seen anything that shows how our Com
Add-In
can do it programatically. If anyone can help with a few lines of code
to
go in the OnConnection method or point me in the right direction, it would
be
appreciated.
|