when I add my method to the ribbon using the ExcelCommand directive,
is there any way to control in what position in the ribbon this menu
and its item get added? Right now, it's always first, but I'd like to
make it last, after the ones I create programmatically.
Thanks,
Chezky
> There are different ways to wire up the actions.
> 1. Add an instance member to your ExcelRibbon-derived class, and use
> the name in the onAction attribute of theribbon. A common issue is
> that you have to make sure that the type or assembly is
> ComVisible(true).
> 2. Add a public static member as a macro, and hook it up via the pair
> onAction="RunTagMacro" tag="DoMyStuff". Your macro won't take any
> parameters in this case.
>
> Are you able to run the samples?
> Maybe you can work from there to see where it might be going wrong.
>
> -Govert
>
> On Aug 25, 4:09 am, Chezky <
chezkyr...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I have added elements to theRibbonaddin menus, but I get an error in
> > Excel stating that it cannot find my macro. I'm setting the onAction
> > member to my function, with a parameter. Are there any special
> > settings I have to watch out for to get this wired right?
>
> > Thanks,
> > Chezky
>
> > On Aug 19, 12:00 am, Chezky <
chezkyr...@gmail.com> wrote:
>
> > > some more qeustions:
> > > how can I add a button directly without a higher levelmenu? Do I have
> > > to access a different command bar? Is there a good source documenting
> > > the commandbars I can access, and their names? I feel a little like
> > > i'm in the cockpit with this code, but i'm flying blind...:)
> > > Can I use this kind of code to add a tab to theribbon, or to check
> > > for an existing tab to add my controls to?
>
> > > Thanks!
> > > Chezky
>
> > > On Aug 18, 9:49 am, Govert van Drimmelen <
gov...@icon.co.za> wrote:
>
> > > > Hi Chezky,
>
> > > > Yes. Check the Distribution\Samples\Ribbon\CommandBarsAllWays.dna
> > > > sample.
>
> > > > The sample shows how to do extended command bars in three ways:
> > > > 1. Add some xml in the .dna files, similar to theribboncustomization
> > > > (it can even be mixed with theribbonxml).
> > > > 2. Call ExcelCommandBarUtil.LoadCommandBars( ...) with a similar .xml
> > > > string.
> > > > 3. Call the Command Bar wrappers from AutoOpen. These call the COM
> > > > interfaces late-bound. This is what you are asking for in your
> > > > question.
>
> > > > Regards,
> > > > Govert
>
> > > > On Aug 18, 2:27 pm, Chezky <
chezkyr...@gmail.com> wrote:
>
> > > > > Hi,
>
> > > > > I am able to designatemenuitems by using the ExcelCommand(MenuText)
> > > > > annotation of my method. Is there a way to createmenuitems that map