 | OO-Snippets: connect via pipeCommons| Keywords | |
|---|
| Language | Python |
|---|
| Application | Office |
|---|
| Authors | Darragh Sherwin (initial)
Tom Schindl (initial)
|
|---|
| Supported Versions | |
|---|
| Supported OS | All |
|---|
| Question | How to connect to openoffice
|
|---|
| Answer |
Code is taken from a mail from Darragh Sherwin on dev@api.openoffice.org
|
|---|
def connect():
import uno
localContext = uno.getComponentContext()
resolver = localContext.ServiceManager.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver", localContext )
remoteContext = resolver.resolve( "uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext" )
return remoteContext
if __name__=="__main__":
remoteContext = connect()
|
Changelog| Date | User | Modification |
|---|
| 2005-10-15 | tomsontom | Initial version |
|