I'm literally going crazy to create a simple macro in writer. How do I get the number of all records of the selected query and move to the next record?
Below a piece of code.
odoc=thiscomponent
dispatcher =…
I need assistance on the below simple Macro in Open Office:
--Macro to check the contents of cell A5 of the activesheet and display message
Sub Check
sheet = ThisComponent.CurrentController.ActiveSheet
value = Contents of cell A5 (Update with…
rule is a worksheet's name,the command works fine:
oCell.Formula = "=LOOKUP(A2;$'rule'.$A$2:$A$9;$'rule'.$B$2:$B$9)"
I want to make the first A2 in LOOKUP with a variable:
for id=2 to NumRows
oCell = Sheet.getCellrangeByName("B"&id)
arg…
I'm new with OO Calc macros. With this code I can style cells on F13:F16 range
REM ***** BASIC *****
Option Explicit
Sub Main
oDoc = ThisComponent
osheets = odoc.getSheets()
osheet = osheets.getByIndex(0)
oCells =…
OpenOffice Writer Index builder is very useful, but has some problems. For example even if terms are removed from the concordance file and a document is re-indexed the removed terms remain indexed. A macro can be written for Microsoft Word to remove…
Considering the example for search & replace of specific uk-to-us words from the Editing Text Documents OO Wiki:
Dim I As Long
Dim Doc As Object
Dim Replace As Object
Dim BritishWords(5) As String
Dim USWords(5) As String
BritishWords() =…
Whenever I place Imports System.Xml above the rest of the code I get an error:
BASIC syntax error. Expected: Sub.
And when I place it inside any of the Subs I get another error:
BASIC syntax error. Unexpected symbol: Stop.
Are we even able to use…
To update pivot tables I use uno with this instruction:
dispatcher.executeDispatch(monDocUno, ".uno:RecalcPivotTable", "", 0, Array())
I would like not to use uno but the basic and its API to recalculate the pivot table of a calc sheet.
How we do…
I want to automate my Processes in AS400 using OpenOffice Calc.
The idea is to enter a value in OpenOffice Calc (e.g "34) and then have that value put into the AS400 screen.
Is that at all possible?
If so then I can create / record a macro in AS400…
I am wanting to insert an image into a LibreOffice Draw document using Basic. I create a Draw document and then I add a page to the document and then rename the pages. I want ti insert an image into Page1 and then add another Image to Page2. I…
The code below, which should creates a jagged array, so that I could then paste its content to the sheet, by using the .setDataArray method, do not work.
I got the error: "BASIC runtime error. Object variable not set."
But it seems, by making some…
Is there a function that tests for a string (non numeric) values and returns a boolean value in Open Office Basic?
I tried IsNumeric on a string and it returns a boolean False. But when I negate it with Not(IsNumeric(value)), it converts the return…
I am planning to write openoffice macros using openoffice basic language. I am struggling to find the objects and methods related to openoffice documents. I googled and found some example codes and the API page openoffice.org/api but I could not…
I try to familiarize myself with the usage of Macro and UNO API on LibreOffice Base, i tried to open my .odb file with the UNO OfficeDatabaseDocument (DOC here :…
I have some repetitive and tedious work to do. I am using open office.
These are the common steps that i have to do daily:-
1)Copy one column from one .csv file and paste into open office spreadsheet column.
2)Copy range of column say 7 and paste…