How to test for LO version in Calc macro?

I have a macro that only works correctly in LO

I would like to be able to test that the user has this (or later) version installed.

I thought that the cell formula "=INFO(“release”) might help but that only produces the unhelpful string “84102822e3d61eb989ddd325abf1ac077904985”

How can I test for the version of Libre Office in my macro?


Do you want to know how to get LO Version using macro?
If so, you use “GetSolarVersion” or “” / “”.
However, 4.0.12 will return value as 4.0.0.
You can see the following URL for the sample code;

Fabulous. Many thanks.