| View previous topic :: View next topic |
| Author |
Message |
grove General User

Joined: 18 Dec 2008 Posts: 6
|
Posted: Thu Dec 18, 2008 6:55 am Post subject: howto retrieve openoffice version |
|
|
Hi,
I'm looking for a way to discover programatically the version of openoffice (2.4 or 3.0).
Any idea?
Thanks. |
|
| Back to top |
|
 |
turtle47 Power User

Joined: 24 Aug 2008 Posts: 66 Location: Germany
|
Posted: Thu Dec 18, 2008 11:57 am Post subject: |
|
|
| Code: | Sub ShowVersionOfOOo
m=OOoVersion()
msgbox m
End Sub
Function OOoVersion() As String
'Retreives the running OOO version
'Author : Laurent Godard
'e-mail : listes.godard@laposte.net
Dim aSettings, aConfigProvider
Dim aParams2(0) As new com.sun.star.beans.PropertyValue
Dim sProvider$, sAccess$
sProvider = "com.sun.star.configuration.ConfigurationProvider"
sAccess = "com.sun.star.configuration.ConfigurationAccess"
aConfigProvider = createUnoService(sProvider)
aParams2(0).Name = "nodepath"
aParams2(0).Value = "/org.openoffice.Setup/Product"
aSettings = aConfigProvider.createInstanceWithArguments(sAccess, aParams2())
OOOVersion=aSettings.getByName("ooSetupVersion")
End Function |
Good luck.
JD _________________ My Extensions
Color2Rows and LastSession |
|
| Back to top |
|
 |
grove General User

Joined: 18 Dec 2008 Posts: 6
|
Posted: Wed Jan 07, 2009 1:10 am Post subject: |
|
|
thank u very much!
it works good!
bye |
|
| Back to top |
|
 |
|