Code: Select all
>>> import uno
>>> local = uno.getComponentContext()
>>> resolver = local.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", local)
>>> context = resolver.resolve("uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext")
>>> desktop = context.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", context)
>>> document = desktop.loadComponentFromURL("file:///bla.doc", "_blank", 0, ())
>>> cursor = document.Text.createTextCursor()
Code: Select all
>>> document.Text.getString()
What I would like to do is go from paragraph to paragraph, query the kind/type of the paragraph, and then read the text for that one paragraph only. Even better, could I noodle through the text of the paragraph and find formatting, like bolding or italic?
Any help is appreciated Thanks!