<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Courier New" size="2"><span style="font-size:10pt;">
<div>Hi,</div>
<div> </div>
<div>I am having trouble trying to wrap UNO function call in BASIC macro.</div>
<div> </div>
<div>I got the macro from the following SimpleCalcAddin example.</div>
<div><a href="http://wiki.openoffice.org/wiki/SimpleCalcAddIn#Building_.26_Testing"><font color="blue"><u>http://wiki.openoffice.org/wiki/SimpleCalcAddIn#Building_.26_Testing</u></font></a></div>
<div> </div>
<div>1. mgr = getProcessServiceManager()</div>
<div>2. o = mgr.createInstance("org.openoffice.sheet.addin.CalcAddinSock")</div>
<div>3. o.startThr()</div>
<div> (where my idl service returned by getServiceName() is org.openoffice.sheet.addin.CalcAddinSock </div>
<div> and it defines a function startThr)</div>
<div> </div>
<div><font face="Arial">I can call the funciton startThr() using "=" in the spread sheet.</font></div>
<div><font face="Arial">Also, the original example RNG is callable from macro by following the example.</font></div>
<div><font face="Arial">One difference from the example is that I am using extension.</font></div>
<div><font face="Arial"> </font></div>
<div><font face="Arial">Please advise how to call UNO functions from BASIC macro.</font></div>
<div><font face="Arial">I intend to call it on a button click. It seems like invoking macro on button click is simple (Form control to add button and assign macro using the event tab).</font></div>
<div><font face="Arial"> </font></div>
<div><font face="Arial">Thanks<br>
Neeraj</font></div>
<div><font face="Arial"> </font></div>
</span></font>
</body>
</html>