Questions tagged [openoffice-basic]

OpenOffice.org Basic is a programming language which is based on StarOffice Basic and bears similarity to Microsoft VBA.

Resources:

109 questions
0
votes
0 answers

Macro OpenOffice Writer: next record

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 =…
Fab
  • 31
  • 1
0
votes
0 answers

OpenOffice - Macro if condition

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…
0
votes
1 answer

How to use variable in openoffice basic's formular?

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…
newview
  • 648
  • 6
0
votes
1 answer

Styling cells with macro

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 =…
user3713179
  • 361
  • 3
  • 12
0
votes
1 answer

How to write macro for OpenOffice Writer to remove all index markerkers

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…
David
  • 101
  • 6
0
votes
1 answer

Is there a way to count the number of actual replaces when using replaceAll in OO Basic?

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() =…
secarica
  • 597
  • 5
  • 18
0
votes
1 answer

How to use Imports System.Xml in Open Office (Basic)?

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…
0
votes
1 answer

Recalc Pivot Table with Basic API

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…
patol
  • 136
  • 2
  • 10
0
votes
0 answers

How to input Cell Value from OpenOffice Calc into AS400 textfield / screen using macros?

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…
0
votes
1 answer

Inset an image into an Open Office Draw document using Basic

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…
hemis
  • 45
  • 1
  • 2
  • 11
0
votes
1 answer

Doesn't .setDataArray method accept date type?

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…
0
votes
2 answers

IsNumeric in Open Office Basic or VBA

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…
DLS
  • 5,313
  • 8
  • 37
  • 50
0
votes
1 answer

OpenOffice Basic macro vs openoffice API

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…
Muthuvel
  • 3
  • 1
0
votes
1 answer

How to fix :"Not Enough Stack Memory" when trying to load() with OfficeDatabaseDocument UNO service

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 :…
0
votes
0 answers

how to copy columns from one spreadsheet and paste into another in open office

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…