I’m surprised we are being referred to other forums like http://en.libreofficeforum.org/node/6017. Many people like me used VBA with Microsoft Office without too much trouble despite its faults. There are (or were; I havn’t been there for a while) all sorts of user guides and code snippets on the web. Not all the snippets work, of course.
I can’t find a suitable beginners’ guide to the LO Basic equivalent, which is inevitably more difficult to use because autocompletion can’t be provided for structural reasons. There are third-part aids like X-ray Tools, but they may not be suitable for all newcomers to LO Basic.
One cause for confusion is that the LO 3 Basic guide seems to imply that you have to create a UNO service do do anything (code example: Obj = createUnoService(“com.sun.star.frame.Desktop”)).
On the other hand a recent example on the present forum (How to write macro programming?) doesn’t require such code, and starts like this after the Dim statements:
oSDescriptor => ThisComponent.createSearchDescriptor()
oSearchResult = ThisComponent.findAll(oSDescriptor)
Presumable the UNO service is already running in LO 22.214.171.124, but I’ll need to go on a “fishing expedition” to find some properties, services and syntax of “createSearchDescriptor()”.
At least question 25137 above shows that if you ask nicely, someone nice may do the coding for you
In anwer to einpoklum (27 September) I have been searching for a while but didn’t find an answer. So I thought it would be fair to make and justify a comment to the effect that there isn’t an up-to-date ‘getting started’ guide suitable for end users, and that some kind of authoritative look-up facility is needed to compensate for the absence of auto-completion. Andrew Pitonyak’s “Macros Explained” document is excellent, but it’s written at a level suitable for developers. Perhaps LO developers havn’t realised how many “ordinary” MS Office users write macros that are a little beyond the reach of a macro recorder; comparable ease of use should be a “must have” for LO.
@oweng Your comment reinforces what I said in my reply above to einpoklum.
As clearly implied by the OP, for the last couple of decades “ordinary” users of Office software expect to have access to macro coding facilities, for which they can learn enough from books line “VBA for idiots”, and from the built-in help and the enormous amount of information that has become available over the years on the web. The same notion applies to hundreds of scientific, technical, educational and artistic applications, with the apparently unique exception of OO/LO. Writing code is a necessity for very many people, and no longer reserved for specialists: just look at any technical drawing, electronics design, maths or statistics package to see how it’s provided for. With some applications, such as the widely-used open-source maths package Scilab, all user input is in the form of code.
The feature of LO that distinguishes it from all that software is that with the available documentation it’s just too difficult to move on from “hello world” to performing simple manipulations on objects belonging to a LO document. It appears that the LO development team thinks it should stay like that; only IT professionals should be allowed to write code.
Despite one of oweng’s remarks, though I’m not an IT specialist I don’t count myself as a beginner here. Like most other scientists I started writing scientific “stuff” at the start of my career (in about 1971). On and off I’ve have had to write short applications as part of my job, for various computers and instruments with embedded software. Now well into retirement, my latest effort in C++ (which has to do with music) is probably more elaborate than many end-users’ Office macros. Like lots of people in all walks of life including schoolkids, I didn’t find writing Excel or Word macros (2003) much of a challenge - except when an object or method didn’t work as advertised. What prompted my reply here was the unpleasant surprise I exerienced when trying to automate some ‘tidying-up’ of a book a friend wrote in Word, so it could be exported from Writer to the eBook format ePub.
Sorry for the long discussion, but some “historical” background is needed to show that the LO team appears to have taken an unfortunate direction on an important point.