This should work in the right context:

document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(
    document, "cspsolver.SolverImpl:execute", "", 0, Array())

HTH, Steffen


Mikael De Bie wrote:
Hi everybody,

I created a uno component. It contains an "execute" function. I can call
this function by using an button on the officeToolBar. What I want to do
is be able to call this function from a macro too.

This is the code that permit the call from the button on the toolbar :
-----------------------------------
        <node oor:name="OfficeToolBar">
            <node oor:name="cspsolver.SolverImpl" oor:op="replace">
            <node oor:name="m1" oor:op="replace">
               <prop oor:name="URL" oor:type="xs:string">
                   <value>cspsolver.SolverImpl:execute</value>
               </prop>
                <prop oor:name="ImageIdentifier" oor:type="xs:string">
                    <value/>
               </prop>
                <prop oor:name="Title" oor:type="xs:string">
                   <value xml:lang="en-US">CSP</value>
               </prop>
               <prop oor:name="Target" oor:type="xs:string">
                   <value>_self</value>
               </prop>
               <prop oor:name="Context" oor:type="xs:string">
                   <value>com.sun.star.sheet.SpreadsheetDocument</value>
               </prop>
            </node>
            </node>
        </node>
----------------------------------

Is there a way to call cspsolver.SolverImpl:execute from a macro ? if
yes, can somebody tell me how ?

Thanks in advance,
Mikael


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to