1. David Lacey
  2. PowerBuilder
  3. Wednesday, 14 April 2021 15:58 PM UTC

Hi All,

I have successfully been using this script to connect to MS word 


, but I now need to do similar with LibreOffice writer if I can. 

What parameter should I be applying to ConnectToNewObject?

I am running PB2019 R2







Accepted Answer
Mark Goldsmith Accepted Answer Pending Moderation
  1. Thursday, 15 April 2021 01:51 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Davy,

Yes, Libre/ OpenOffice does have OLE/COM server capability. You should be able to connect to it using iole_object.ConnectToNewObject("com.sun.star.ServiceManager").

The Libre/ OpenOffice object model is a different beast than MS Word and will take some investigation into the different objects, their respective properties, methods etc.



There are no comments made yet.
David Lacey Accepted Answer Pending Moderation
  1. Thursday, 15 April 2021 07:44 AM UTC
  2. PowerBuilder
  3. # 1

Thanks everyone for your responses. Most appreciated.  I will give Mark's response a crack. We had being using OLE to word to populate a lengthy form ( Word document ) using bookmarks in the document.  Going to try the same with LibreOfficeWriter.

The backstory to this is that our PB application was being used on our customer's site, where they had MS Office installed on their application server. We then moved them to our cloud environment, where, for reasons of cost, we do not have MS Office Installed and have Libre Office instead. 


  1. Mark Goldsmith
  2. Thursday, 15 April 2021 13:26 PM UTC
You're welcome Davy and best of luck with LibreOfficeWriter.


  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 14 April 2021 18:02 PM UTC
  2. PowerBuilder
  3. # 2

Greetings, David -

You probably should be asking the people responsible for LibreOffice if they support connection to Writer via OLE. This will possible only if LibreOffice Writer provides an OLE Server. Since OLE is a Windows-specific technology, I would be surprised if an OLE Server is available... but, hey, sometimes I'm surprised!

Best regards, John

  1. Miguel Leeuwe
  2. Thursday, 15 April 2021 02:39 AM UTC
Hi John,

Yes, there's others like "Freeoffice" (Softmaker) which also support OLE and are quite a good competition for MS Office. (very compatible and very cheap).

  1. Helpful
There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.