Ask Your Question
0

how do I retrieve the LO version with a macro

asked 2015-06-12 14:57:17 +0200

jay Arr gravatar image

updated 2015-08-25 18:38:33 +0200

Alex Kemp gravatar image

Have have a need to retrieve the LO version number with a macro (I want to log it along with Error numbers for debugging purposes)

I think perhaps the Base variable "version" holds the info. At least it does sometimes ... I have the same LO app with the same version of LO running on an iMac & a macbook pro the former print Version yeilds

"LibreOffice 4.4.3.2"

the latter causes a weird form error #380 at line AllForms I'm trying to put the text into a text box on an About form for the application in both instances

Both machines are running OSX 10.10.3

tTo repeat both are running the SAME LO app withe SAME code ???

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-06-12 19:13:50 +0200

pierre-yves samyn gravatar image

Hi - You can use

sub FindBuildID
dim oService as object
oService = CreateUnoService("com.sun.star.sheet.FunctionAccess")
msgbox oService.callFunction("INFO", array( "version"))    
end sub

Or

sub FindVersion()

dim kc as object

globalScope.basicLibraries.loadLibrary("Tools")

kc = getRegistryKeyContent("/org.openoffice.Setup/Product", false)

msgbox kc.ooSetupVersionAboutBox
'msgbox kc.ooName' 
'msgbox kc.ooSetupVersion'

end sub
edit flag offensive delete link more

Comments

Thank you.

jay Arr gravatar imagejay Arr ( 2015-06-13 07:46:55 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-06-12 14:57:17 +0200

Seen: 82 times

Last updated: Jun 12 '15