Ask Your Question

Get LibreOffice Version with macro

asked 2018-04-12 12:38:39 +0200

WilliamTurella gravatar image

updated 2018-04-12 13:30:10 +0200

pierre-yves samyn gravatar image

Hi, i have libre Office 6 on windows 7 x64 and i am trying to get the version of the libreoffice and whether it is x86 or x64 with basic macro on calc, but i could not find a way to do that. With the code below i can get the program version, but i also need to know if it is x86 or x64.

Sub getVersion

Dim oProdNameAccess As Object



MSGBOX oProdNameAccess.getByName("ooSetupVersion")

End sub
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2018-04-12 13:48:02 +0200

Lupp gravatar image

updated 2018-04-12 22:14:35 +0200

You find the wanted information, much more, and relevant links here:

(The macro demonstrated by Zizi64 in his first attachment there e.g. also works with LibreOffice 6.0,3.2)

Edit 1 regarding the comment by @pierre-yves samyn:
My answer was too rash. I since investigated the mentioned code and in specific the node /org.openoffice.Setup and couldn't find the bitwidth anywhere.

edit flag offensive delete link more


Hi @Lupp

I may be wrong but it seems to me that the need is not only to get the version number but to know if it's 32 or 64 bits


pierre-yves samyn gravatar imagepierre-yves samyn ( 2018-04-12 16:28:57 +0200 )edit

@pierre-yves samyn: Thanks and sorry. I obviously was too lazy to read the question completely.

Lupp gravatar imageLupp ( 2018-04-12 22:06:57 +0200 )edit

Thanks, i will take a look on openoffice forum

WilliamTurella gravatar imageWilliamTurella ( 2018-04-13 12:21:24 +0200 )edit

answered 2018-04-12 13:29:35 +0200

pierre-yves samyn gravatar image


This is probably not the best way to proceed but, at least with Windows you should be able to do:

dim oContext as object, sUrl as string

oContext = GetDefaultContext().getByName("/singletons/")
sUrl = oContext.OfficeInstallationDirectoryURL

if Instr(sUrl,"x86") > 0 then
    print "32"
    print "64"
end if


edit flag offensive delete link more


It's not exactly what i was looking for, but it helps a lot the code above, thenks

WilliamTurella gravatar imageWilliamTurella ( 2018-04-13 12:23:22 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-04-12 12:38:39 +0200

Seen: 377 times

Last updated: Apr 12 '18