from win32com.client.dynamic import Dispatch objServiceManager = Dispatch('com.sun.star.ServiceManager') Stardesktop = objServiceManager.CreateInstance('com.sun.star.frame.Desktop') doc = Stardesktop.loadComponentfromURL('private:factory/swriter', '_blank', 0, []) text = doc.getText() text.setString("Hello World")