On Tue, 2005-02-15 at 08:59, Joerg Budischewski wrote:
> Ian Laurenson wrote:
[snip]
> > Any suggestions for how to test if PyUno is installed?
Brilliant - thank you!
> the following script tries to load python into the office and checks,
> whether this was successful.
> Sub Main
> if hasPythonLoader() then
> msgbox "Python is installed"
> else
> msgbox "Python is not useable in office"
> end if
> End sub
>
> function hasPythonLoader() as Boolean
> on error goto myErrorHandler
> ret = createUnoService("com.sun.star.loader.Python" )
> hasPythonLoader() = not isnull( ret )
> exit function
> myErrorHandler:
> resume next
> End function
Thanks, Ian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]