How to call a macro stored in a stencil using xml code

Started by davidgon, May 05, 2017, 10:34:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davidgon

Hello!

I have created a new tab in the ribbon using xml code. Now, I have the onAction of the buttons refered to macros in the main document. I want to change this and refer the onAction="mymacro.mymacro" to a macro stored in a stencil ("mystencil").

I have tried the easy way, onAction="mystencil.mymacro.mymacro", but it does not work.

Any idea?

Thanks!  ;D

Yacine

A silly idea: you could leave a generic macro in the document. The macro would then call the actual macro stored in stencil by means of "callbyname".

The must be a more elegant why out there.
Yacine

metuemre

The best way is to store custom ribbon code and all other macros in stencil as well. Then you can easily call your macro with onAction callback function

Yacine

Yacine