LibreOffice Basic is a procedural, interpreted programming language from the Basic family that can be used to write macros for applications in the LibreOffice Suite.
Questions tagged [libreoffice-basic]
240 questions
1
vote
1 answer
clipboard manager extension for writer
I am trying to build a clipboard manager extension for Libre office. When-ever I cut (or copy) text from a document, it should be appended to another file so that I will never loose my work even if I forget to paste it somewhere. Is it possible in…

shantanuo
- 31,689
- 78
- 245
- 403
1
vote
1 answer
Inserting and removing text into a textbox on a SHEET in Libreoffice calc BASIC
As I can't solve my problem I'd like to ask someone more experienced.I created simple dialog (4 fields) to let the user enter few data. After clicking "Submit" button those data should be inserted into textboxes put ON THE SHEET (not on any dialog).…

Marcin
- 11
- 1
1
vote
0 answers
Libre Calc not respecting custom fields
I have an .xlsx file that has some custom date/time formatted columns. Specifically, I have 2 columns that have custom format of yyyy-mm-ddThh:nn:ssZ
When I open it in LibreOffice Calc, the dates in those 2 columns show as decimal numbers instead,…

Nick
- 39
- 9
1
vote
1 answer
Bold text in LibreOffice using macros (LibreOffice Basic)
I am doctor (X-ray). Asking my friend to create text macros for me to write protocols faster.
I just wanted to push ALT+Q (or another letter). Then push ALT+number (from 0 to 9).
For each ALT+number I insert prepared text.
It is work.
Part of…

HanunagreZ
- 23
- 2
1
vote
1 answer
In LibreOffice Calc, how do I change through LibreOffice Basic the value of a cell with an event listener set to it without crashing the program?
I am trying to create two tables which mirror changes made to any of them to one another automatically.
To that end, I added event listeners which are triggered when the cells of these tables are edited by the user.
Unfortunately, editing one of the…

Idris Cheikh
- 21
- 3
1
vote
1 answer
How to pass arguments to an event listener in LibreOffice Basic?
I am writing a macro to automate tasks on a spreadsheet in LibreOffice Calc.
One of those tasks is simply to add the numbers contained in a given cell range and write the total in the appropriate cell when one of these cells is edited. (The cells…

Idris Cheikh
- 21
- 3
1
vote
2 answers
LibreOffice Draw: making Makro to edit a text field
I wish to make some code to edit the date on a pdf form. (the goal is to make all the forms for a whole year at once)
The PDF form is not normally editable, but with LibreOffice draw it can be easily edited.
The problem is with LibreOffice Draw that…

Willem van Houten
- 174
- 1
- 9
1
vote
0 answers
How do I directly increment a cell value by 1 as part of a, LibraCalc, macro function
I am making a spreadsheet to tally votes for a car show. I used basic years ago but it is not the same as writing a macro so I have been Using the macro record function in LibraCalc (this is included with LibraOffice, an open source program similar…

Rag Top Bob
- 11
- 1
1
vote
0 answers
How to restore standard menu bar (File, Edit, View, Insert, Format, etc.) in Libreoffice
libreoffice-6.0.7 on Ubuntu Bionic
After purging and reinstalling what I thought was a corrupted version of LibreOffice, it seems that the "Main Menu" of LibreOffice has been deprecated. What I see now are just graphical toolbars of what looks…

user3512967
- 181
- 1
- 3
1
vote
1 answer
How to insert line breaks in strings
How to insert line breaks when writing macros in libreoffice calc?
e.g:
oCell.SetString("hello /? world!")
Out:
hello
world!

kendallbp
- 61
- 5
1
vote
0 answers
LibreOffice Writer Macro - Add Pictures in the right place
I have a template file with several pages with text, and I want to make a Macro to add one image per page under the text.
I tried to adapt a script from Andrew Pitonyak, but the result is not as expected, I probably missed something to force a page…

DebPokus
- 13
- 3
1
vote
0 answers
LibreOffice not maintaining the alignment after converting a docx to pdf using python
I installed Libreoffice on my win system and able to convert the .docx file to pdf.
import os
import sys
newdir = os.path.abspath(os.path.join(os.path.dirname(__file__)))
if not os.path.exists(newdir):
os.makedirs(newdir)
file_name =…

ninjacode
- 318
- 2
- 18
1
vote
1 answer
Subtract column position using Macros using StarBasic in LibreCalc given a range of columns eg. A1:B1 - must result 1
Subtract column position using VBA (libre StarBasic) macro in LibreCalc given a range of columns eg. A1:B1 must result 1
I have a set of ranges
I would like to get the Column position difference as integer using VBA macro in Libre…

Estatistics
- 874
- 9
- 24
1
vote
1 answer
Libreoffice Calc Basic How to append 2 decimal places by code
Declaration
Dim currDoc As Object
Dim currSheet As Object
Dim cell As Object
currDoc = ThisComponent
currSheet = currDoc.sheets(0)
Logic
cell.Formula = cDbl(cell.Value)
Desired Output
100,00

Tobi S
- 145
- 8
1
vote
1 answer
Adding custom Dict to spell check extension of Libre office
I am trying to create and distribute a custom dictionary along with the primary one. I tried the steps mentioned here...
https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=33297
A user franx has provided step-by-step guide of ho to create a…

shantanuo
- 31,689
- 78
- 245
- 403