Open external file from LibreOffice with OpenOffice

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
gp75
Posts: 7
Joined: Fri Jan 03, 2020 4:50 pm

Open external file from LibreOffice with OpenOffice

Post by gp75 »

Good evening, I need to open an .ods file from libreoffice with openoffice, I tried this way, but it doesn't work from libreoffice, from openoffice it works.
Same thing if from libreoffice I want to open a file with libreoffice. From openoffice to openoffice ok. from libreoffice to libreoffice ok, but I need it from libreoffice to openoffice.

Code: Select all

Sub ExampleShell
  Shell("C:\Program Files (x86)\OpenOffice 4\program\scalc.exe", 2, "C:\Users\Gp\Desktop\example.ods")
End Sub
LibreOffice 4.1.6
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Open external file from libreoffice with openoffice

Post by Zizi64 »

but I need it from libreoffice to openoffice.
Why you need it? It is not a ggod idea to edit a document with different editor. The LibreOffice has a few new feature that will be embedded into the ODF documents, and - maybe - the AOO can not handle them. For example the "more than three conditions" for the conditional format function.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
gp75
Posts: 7
Joined: Fri Jan 03, 2020 4:50 pm

Re: Open external file from LibreOffice with OpenOffice

Post by gp75 »

Thanks for the answer, let me explain better, I created a database with libreoffice full of macros that with openoffice some do not work (e.g. data fields ect) from this database I need to open and process a calc file full of different formulas and macros created years ago, if i open it with libreoffice many features go into error like obsolete macros and formulas. i should convert everything.
LibreOffice 4.1.6
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Open external file from LibreOffice with OpenOffice

Post by Zizi64 »

Please upload an ODF type sample file with the embedded macros.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
musikai
Volunteer
Posts: 294
Joined: Wed Nov 11, 2015 12:19 am

Re: Open external file from LibreOffice with OpenOffice

Post by musikai »

gp75 wrote:Good evening, I need to open an .ods file from libreoffice with openoffice, I tried this way, but it doesn't work from libreoffice, from openoffice it works.
Same thing if from libreoffice I want to open a file with libreoffice. From openoffice to openoffice ok. from libreoffice to libreoffice ok, but I need it from libreoffice to openoffice.

Code: Select all

Sub ExampleShell
  Shell("C:\Program Files (x86)\OpenOffice 4\program\scalc.exe", 2, "C:\Users\Gp\Desktop\example.ods")
End Sub
I think you can't have LibreOffice and OpenOffice running at the same time. (even without code)
Win7 Pro, Lubuntu 15.10, LO 4.4.7, OO 4.1.3
Free Project: LibreOffice Songbook Architect (LOSA)
http://struckkai.blogspot.de/2015/04/li ... itect.html
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Open external file from LibreOffice with OpenOffice

Post by RoryOF »

musikai wrote: I think you can't have LibreOffice and OpenOffice running at the same time. (even without code)
I understand that it is possible: perhaps Villeroy will remind us how this can be done.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
musikai
Volunteer
Posts: 294
Joined: Wed Nov 11, 2015 12:19 am

Re: Open external file from LibreOffice with OpenOffice

Post by musikai »

I just checked on Windows 7 32bit.
I have LO regular install and OO portable:
1.LO open, then start OO not possible.
2.OO open, then start LO is possible.

Or LO portable and OO portable:
In both directions not possible.
Win7 Pro, Lubuntu 15.10, LO 4.4.7, OO 4.1.3
Free Project: LibreOffice Songbook Architect (LOSA)
http://struckkai.blogspot.de/2015/04/li ... itect.html
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Open external file from LibreOffice with OpenOffice

Post by robleyd »

Doesn't seem to be a problem running both simultaneously in my flavour of Linux.
lo_aoo_together.png
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Open external file from LibreOffice with OpenOffice

Post by RoryOF »

If I remember correctly, the problem was with the installation of the desktop-integration: it complained that one file was already in use by the other and couldn't install its own version of that file. I think there will have to be, possibly setup manually, two sets of menu items, each set pointing to one or other of the versions.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
gp75
Posts: 7
Joined: Fri Jan 03, 2020 4:50 pm

Re: Open external file from LibreOffice with OpenOffice

Post by gp75 »

musikai wrote: I think you can't have LibreOffice and OpenOffice running at the same time. (even without code)
Without code works
Zizi64 wrote:Please upload an ODF type sample file with the embedded macros.
The file is complex I can't attach it, however I can convert macros, the problem is that it would take me a long time.

robleyd wrote:Doesn't seem to be a problem running both simultaneously in my flavour of Linux.
lo_aoo_together.png
Did you use the macro that I posted at the beginning?


thank you
LibreOffice 4.1.6
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Open external file from LibreOffice with OpenOffice

Post by robleyd »

No - I just suggest that both AOO and LO can be run together in my environment at least.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Post Reply