OpenOffice Basic

Last updated

OpenOffice Basic (formerly known as StarOffice Basic or StarBasic or OOoBasic) is a dialect of the programming language BASIC that originated with the StarOffice office suite and spread through OpenOffice.org and derivatives such as Apache OpenOffice and LibreOffice (where it is known as LibreOffice Basic). The language is a domain-specific programming language which specifically serves the OpenOffice application suite.

Contents

Example

Although OpenOffice Basic is similar to other dialects of BASIC, such as Microsoft's Visual Basic for Applications (VBA), the application programming interface (API) is very different, as the example below of a macro illustrates. While there is a much easier way to obtain the "paragraph count" document property, the example shows the fundamental methods for accessing each paragraph in a text document, sequentially.

SubParaCount'' Count number of paragraphs in a text document'DimDocAsObject,EnumAsObject,TextElAsObject,CountAsLongDoc=ThisComponent' Is this a text document?IfNotDoc.SupportsService("com.sun.star.text.TextDocument")ThenMsgBox"This macro must be run from a text document",64,"Error"ExitSubEndIfCount=0' Examine each component - paragraph or table?Enum= Doc.Text.CreateEnumerationWhileEnum.HasMoreElementsTextEl=Enum.NextElement' Is the component a paragraph?IfTextEl.SupportsService("com.sun.star.text.Paragraph")ThenCount=Count+1EndIfWend'Display resultMsgBoxCount,0,"Paragraph Count"EndSub

See also

Further reading

Related Research Articles

<span class="mw-page-title-main">Microsoft Excel</span> Spreadsheet editor, part of Microsoft Office

Microsoft Excel is a spreadsheet developed by Microsoft for Windows, macOS, Android, iOS and iPadOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications (VBA). Excel forms part of the Microsoft 365 suite of software.

<span class="mw-page-title-main">Macro (computer science)</span> Rule for substituting a set input with a set output

In computer programming, a macro is a rule or pattern that specifies how a certain input should be mapped to a replacement output. Applying a macro to an input is known as macro expansion. The input and output may be a sequence of lexical tokens or characters, or a syntax tree. Character macros are supported in software applications to make it easy to invoke common command sequences. Token and tree macros are supported in some programming languages to enable code reuse or to extend the language, sometimes for domain-specific languages.

VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers without error handling and with subroutines and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6.0 built into most desktop Microsoft Office applications. Although based on pre-.NET Visual Basic, which is no longer supported or updated by Microsoft, the VBA implementation in Office continues to be updated to support new Office features. VBA is used for professional and end-user development due to its perceived ease-of-use, Office's vast installed userbase, and extensive legacy in business.

<span class="mw-page-title-main">WordPerfect</span> Word processing application

WordPerfect (WP) is a word processing application, now owned by Corel, with a long history on multiple personal computer platforms. At the height of its popularity in the 1980s and early 1990s, it was the dominant player in the word processor market, displacing the prior market leader WordStar.

<span class="mw-page-title-main">Visual Basic (.NET)</span> Object-oriented computer programming language

Visual Basic (VB), originally called Visual Basic .NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on .NET, Mono, and the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visual Basic language, the last version of which was Visual Basic 6.0. Although the ".NET" portion of the name was dropped in 2005, this article uses "Visual Basic [.NET]" to refer to all Visual Basic languages released since 2002, in order to distinguish between them and the classic Visual Basic. Along with C# and F#, it is one of the three main languages targeting the .NET ecosystem. As of March 11, 2020, Microsoft announced that evolution of the VB.NET language has concluded.

<span class="mw-page-title-main">Windows Script Host</span> Automation Technology for Windows

The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. This tool was first provided on Windows 95 after Build 950a on the installation discs as an optional installation configurable and installable by means of the Control Panel, and then a standard component of Windows 98 and subsequent and Windows NT 4.0 Build 1381 and by means of Service Pack 4. The WSH is also a means of automation for Internet Explorer via the installed WSH engines from IE Version 3.0 onwards; at this time VBScript became means of automation for Microsoft Outlook 97. The WSH is also an optional install provided with a VBScript and JScript engine for Windows CE 3.0 and following and some third-party engines including Rexx and other forms of Basic are also available.

<span class="mw-page-title-main">Universal Network Objects</span>

Universal Network Objects (UNO) is the component model used in the OpenOffice.org and LibreOffice computer software application suites. It is interface-based and designed to offer interoperability between different programming languages, object models and machine architectures, on a single machine, within a LAN or over the Internet.

OpenOffice or open office may refer to:

<span class="mw-page-title-main">NeoOffice</span> macOS office suite

NeoOffice is an office suite for the macOS operating system developed by Planamesa Inc. It is a commercial fork of the free and open source LibreOffice office suite, including a word processor, spreadsheet, presentation program and graphics program, it adds some features not present in the macOS versions of LibreOffice and Apache OpenOffice. Current versions are based on LibreOffice 4.4 which was released mid-2014.

<span class="mw-page-title-main">AutoIt</span>

AutoIt is a freeware programming language for Microsoft Windows. In its earliest release, it was primarily intended to create automation scripts for Microsoft Windows programs but has since grown to include enhancements in both programming language design and overall functionality.

This is an overview of software support for the OpenDocument format, an open document file format for saving and exchanging editable office documents.

This article describes the technical specifications of the OpenDocument office document standard, as developed by the OASIS industry consortium. A variety of organizations developed the standard publicly and make it publicly accessible, meaning it can be implemented by anyone without restriction. The OpenDocument format aims to provide an open alternative to proprietary document formats.

In computer programming, an enumerated type is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language. An enumerated type can be seen as a degenerate tagged union of unit type. A variable that has been declared as having an enumerated type can be assigned any of the enumerators as a value. In other words, an enumerated type has values that are different from each other, and that can be compared and assigned, but are not specified by the programmer as having any particular concrete representation in the computer's memory; compilers and interpreters can represent them arbitrarily.

<span class="mw-page-title-main">Visual Basic (classic)</span> Event-driven programming language

The original Visual Basic is a third-generation event-driven programming language from Microsoft known for its Component Object Model (COM) programming model first released in 1991 and declared legacy during 2008. Microsoft intended Visual Basic to be relatively easy to learn and use. Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects.

<span class="mw-page-title-main">BlackBox Component Builder</span> Software development tool

BlackBox Component Builder is an integrated development environment (IDE) optimized for component-based software development developed by a small spin-off company, Oberon microsystems AG, of ETH Zurich in Switzerland. The IDE consists of development tools, a library of reusable components, a framework that simplifies developing robust custom components and applications, and a run-time environment for components.

Basic4ppc is a programming language for Pocket PC handheld computers running Windows Mobile operating system, by Anywhere Software. The language is based on a BASIC-like syntax, taking advantage of Microsoft's .NET technology, to allow additional libraries, graphical user interface design of windows forms, rapid application development (RAD), and .NET framework compatible compilation. The language implements a unique way of adding objects to a program without being object-oriented. Its advantages are simplicity, development pace and the integration with .NET framework. A special version of the integrated development environment (IDE) allows developing straight onto the Windows Mobile device. With the demise of Windows Mobile operating system and the devices running it Basic4PPC came to the end of its life in about 2012. For owners of Basic4PPC it remains a useful Windows-desktop BASIC compiler as it runs code directly in the Windows environment and it can compile a project to a Windows 'exe' file for use as a Windows program.

<span class="mw-page-title-main">LibreOffice</span> Free and open-source office software suite

LibreOffice is a free and open-source office productivity software suite, a project of The Document Foundation (TDF). It was forked in 2010 from OpenOffice.org, an open-sourced version of the earlier StarOffice. The LibreOffice suite consists of programs for word processing, creating and editing of spreadsheets, slideshows, diagrams and drawings, working with databases, and composing mathematical formulae. It is available in 115 languages. TDF doesn't provide support for LibreOffice, but enterprised-focused editions are available from companies in the ecosystem.

Nota Bene consists of a tightly integrated software suite of applications, including word processing, reference management and document text analysis software that is focused on writers and scholars in the Humanities, Social Sciences, and the Arts. The integrated suite is referred to as the Nota Bene Workstation. It operates on the Windows platform and on Mac computers.

Microsoft Office shared tools are software components that are included in all Microsoft Office products.