Hi,

Thanks for your suggestion, but I already started exploring Python-UNO
bridge and made some progress.
(http://udk.openoffice.org/python/python-bridge.html)

A python script connects to my running OOo, this is great because now
I don't have to startup and wait for OOo after every marco execution.

I can execute this Python script from Smalltalk.

My first question is solved now. But how to invoke my OOs macro's
(written in Basic, included in OOo) from within this Python script?

>1. How to run ooffice as a service on Debian Linux?
>2. And how to execute macro's with this service?

Note: I'm a complete new to OOo and python.

Thanks in advance,

Mathieu

ps. working python program so far:

# get the uno component context from the PyUNO runtime
localContext = uno.getComponentContext()

# create the UnoUrlResolver
resolver = localContext.ServiceManager.createInstanceWithContext(
                                "com.sun.star.bridge.UnoUrlResolver", 
localContext )

# connect to the running office
ctx = resolver.resolve(
"uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
)
smgr = ctx.ServiceManager

# get the central desktop object
desktop = smgr.createInstanceWithContext( "com.sun.star.frame.Desktop",ctx)



On 1/19/06, Andrew Douglas Pitonyak <[EMAIL PROTECTED]> wrote:
> Mathieu van Echtelt wrote:
>
> >Dear all,
> >
> >With OpenOffice 2.0 we convert Excel files. Macro's for conversion are
> >invoked over command line ($ ooffice -invisible macro:///....).
> >
> >Every command line execution starts up and closes ooffice, this is
> >problematic because starting up OOo takes very long (>30 sec.).
> >
> >Questions:
> >
> >1. How to run ooffice as a service on Debian Linux?
> >2. And how to execute macro's with this service?
> >
> >I found command line option:
> >
> >OOffice -headless -accept=\socket,host=localhost,port=8100;urp;
> >
> >This looks like to answer question 1, but how to execute our macro's
> >with this service?
> >note: requests will come from our application written in Smalltalk
> >(VW) which doesn't have any specific OOo/UNO integration.
> >
> >Thanks in advance,
> >
> >
> If you start OOo in this way, it tells it to listen on port 8100 so that
> you can connect to it on that port.......
> You might want to ask this qeustion on the dev list if you do not
> receive an appropriate answer.
> In the meantime, download my fee macro document and read the section titled
> "Connect to a remote OOo server using Basic"
>
> I am not an expert in this, I only wrote this section so that I could
> verify that I could remotely connect using Basic...
>
> --
> Andrew Pitonyak
> My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
> My Book: http://www.hentzenwerke.com/catalog/oome.htm
> Info:  http://www.pitonyak.org/oo.php
> See Also: http://documentation.openoffice.org/HOW_TO/index.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to