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 

iole_object.ConnectToNewObject("word.application.8") 

, 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

Thanks 

Davy

 

 

 

 

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.

HTH...regards,

Mark

Comment
There are no comments made yet.
Douglas Ross Accepted Answer Pending Moderation
  1. Wednesday, 6 September 2023 11:05 AM UTC
  2. PowerBuilder
  3. # 1

I am trying this exact thing now (2 years after this original posting). I would like to have PB use OLE to insert values in OpenOffice or LibreOffice word processor in bookmarks (and hopefully cells in tables).

Is there any information you can share about such calls? How to open a Libre template, find and insert text into a bookmark? 

Thank you,

Doug

Comment
  1. Douglas Ross
  2. Wednesday, 6 September 2023 11:46 AM UTC
Thank you Miguel, but that seems to be only OLE within LibreOffice docs to other LibreOffice docs. I want PB to point to, open, and change a WORD doc or Libre doc. I need to get a good pointer to Writer, then open a template, and then go to Bookmarks and insert the data from PB calculated records.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 6 September 2023 12:13 PM UTC
Sorry, in that case I don't know. My point was to do some research using a web search. Maybe you can ask on some forum of the LibreOffice web site. (It seems OpenOffice is outdated). Good luck!
  1. Helpful
  1. Douglas Ross
  2. Wednesday, 6 September 2023 12:16 PM UTC
Thank you Miguel
  1. Helpful
There are no comments made yet.
David Lacey Accepted Answer Pending Moderation
  1. Thursday, 15 April 2021 07:44 AM UTC
  2. PowerBuilder
  3. # 2

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. 

 

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

Regards,

Mark
  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. # 3

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

Comment
  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).

regards.
  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.