Seite 1 von 1

Re: OO Version

Verfasst: Do, 03.04.2008 13:17
von ykcim
Hallo,

die Informationen stehen in den Setupinformationen.
Es gibt eine Funktion von Laurent Godard um diese auszulesen.

Code: Alles auswählen

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

mfg
Michael