Remote control or script Open Office to edit Word document from Python
I want to (preferably on Windows) start Open Office on a particular document, search for a fixed string and replace it with another string selected by my program. How do I do that, from an external Python program? OLE-something? The native Python scripting solution? (The document is in the Word 97-2003 format, but that is probably not relevant?) jro I'd say using the Python-UNO bridge . Does this work for you? import uno ctx = uno.getComponentContext() service_manager = ctx.getServiceManager() desktop = service_manager.createInstanceWithContext("com.sun.star.frame.Desktop", ctx) document =