Difference between revisions of "Documentation/BASIC Guide"
m |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|NextPage=Documentation/BASIC Guide/Language | |NextPage=Documentation/BASIC Guide/Language | ||
}} | }} | ||
− | {{DISPLAYTITLE:{{ | + | {{DISPLAYTITLE:{{AOo}} BASIC Programming Guide}} |
__NOTOC__ | __NOTOC__ | ||
{{Download_Collection|MediaWiki:Collections/BASIC_Guide}} | {{Download_Collection|MediaWiki:Collections/BASIC_Guide}} | ||
− | This guide provides an introduction to programming with {{ | + | This guide provides an introduction to programming with {{AOo}} Basic. To get the most out of this book, you should be familiar with other programming languages. Extensive examples are provided to help you quickly develop your own {{AOo}} Basic programs. |
− | {{ | + | {{Tip|{{AOo}} offers a complete user interface for developing programs in Basic. It is described in the chapter [[Documentation/DevGuide/Basic/OpenOffice.org_Basic|{{AOo}} Basic]] of the Developer's Guide. Before attempting to write macros you should read [[Documentation/DevGuide/Basic/First_Steps_with_OpenOffice.org_Basic|First Steps with {{AOo}} Basic]] and the pages on [[Documentation/DevGuide/Basic/OpenOffice.org_Basic_IDE|{{AOo}} Basic IDE]]. Since other pages of the Developer's Guide on Basic are technical details for experienced Basic programmers, you should then read this Basic Programming Guide.}} |
− | This guide divides information about {{ | + | This guide divides information about {{AOo}} administration into several chapters. The first three chapters introduce you to {{AOo}} Basic: |
− | * [[Documentation/BASIC Guide/Language|The Language of {{ | + | * [[Documentation/BASIC Guide/Language|The Language of {{AOo}} Basic]] |
* [[Documentation/BASIC Guide/Runtime_Library|Runtime Library]] | * [[Documentation/BASIC Guide/Runtime_Library|Runtime Library]] | ||
* [[Documentation/BASIC Guide/API_Intro|Introduction to the API]] | * [[Documentation/BASIC Guide/API_Intro|Introduction to the API]] | ||
− | These chapters provide an overview of {{ | + | These chapters provide an overview of {{AOo}} Basic and should be read by anyone who intends to write {{AOo}} Basic programs. The remaining chapters describe the individual components of the {{AOo}} API in more detail and can be read selectively as required: |
* [[Documentation/BASIC Guide/Documents|Working with Documents]] | * [[Documentation/BASIC Guide/Documents|Working with Documents]] | ||
Line 30: | Line 30: | ||
* [[Documentation/BASIC Guide/Forms|Forms]] | * [[Documentation/BASIC Guide/Forms|Forms]] | ||
− | ==About {{ | + | ==About {{AOo}} Basic== |
− | The {{ | + | The {{AOo}} Basic programming language has been developed especially for {{AOo}} and is firmly integrated in the Office package. |
− | As the name suggests, {{ | + | As the name suggests, {{AOo}} Basic is a programming language from the Basic family. Anyone who has previously worked with other Basic languages — in particular with Visual Basic or Visual Basic for Applications (VBA) from Microsoft — will quickly become accustomed to {{AOo}} Basic. Large sections of the basic constructs of {{AOo}} Basic are compatible with Visual Basic. |
− | The {{ | + | The {{AOo}} Basic programming language can be divided into four components: |
− | * The language of {{ | + | * The language of {{AOo}} Basic: Defines the elementary linguistic constructs, for example, for variable declarations, loops, and functions. |
− | * The runtime library: Provides standard functions which have no direct reference to {{ | + | * The runtime library: Provides standard functions which have no direct reference to {{AOo}}, for example, functions for editing numbers, strings, date values, and files. |
− | * The {{ | + | * The {{AOo}} API (Application Programming Interface): Permits access to {{AOo}} documents and allows these to be created, saved, modified, and printed. |
* The Dialog Editor: Creates personal dialog windows and provides scope for the adding of control elements and event handlers. | * The Dialog Editor: Creates personal dialog windows and provides scope for the adding of control elements and event handlers. | ||
− | {{Documentation/VBAnote|Compatibility between {{ | + | {{Documentation/VBAnote|Compatibility between {{AOo}} Basic and VBA relates to the {{AOo}} Basic language as well as the runtime library. The {{AOo}} API and the Dialog Editor are not compatible with VBA (standardizing these interfaces would have made many of the concepts provided in {{AOo}} impossible).}} |
− | ==Intended Users of {{ | + | ==Intended Users of {{AOo}} Basic== |
− | The scope of application for {{ | + | The scope of application for {{AOo}} Basic begins where the standard functions of {{AOo}} end. Routine tasks can therefore be automated in {{AOo}} Basic, links can be made to other programs — for example to a database server — and complex activities can be performed at the press of a button by using predefined scripts. |
− | {{ | + | {{AOo}} Basic offers complete access to all {{AOo}} functions, supports all functions, modifies document types, and provides options for creating personal dialog windows. |
− | ==Use of {{ | + | ==Use of {{AOo}} Basic== |
− | {{ | + | {{AOo}} Basic can be used by any {{AOo}} user without any additional programs or aids. Even in the standard installation, {{AOo}} Basic has all the components needed to create its own Basic macros, including: |
* The integrated development environment (IDE) which provides an editor for creating and testing macros. | * The integrated development environment (IDE) which provides an editor for creating and testing macros. | ||
− | * The interpreter, which is needed to run {{ | + | * The interpreter, which is needed to run {{AOo}} Basic macros. |
− | * The interfaces to various {{ | + | * The interfaces to various {{AOo}} applications, which allow for direct access to Office documents. |
==More Information== | ==More Information== | ||
− | The components of the {{ | + | The components of the {{AOo}} API that are discussed in this guide were selected based on their practical benefits for the {{AOo}} Basic programmer. In general, only parts of the interfaces are discussed. For a more detailed picture, see [https://www.openoffice.org/api/docs/common/ref/com/sun/star/module-ix.html the API reference]. |
− | The [[Documentation/DevGuide/OpenOffice.org_Developers_Guide|Developer's Guide]] describes the {{ | + | The [[Documentation/DevGuide/OpenOffice.org_Developers_Guide|Developer's Guide]] describes the {{AOo}} API in more detail than this guide, but is primarily intended for Java and C++ programmers. Anyone who is already familiar with {{AOo}} Basic programming can find additional information in the Developer's Guide on {{AOo}} Basic and {{AOo}} programming. Advanced programmers may wish to consult Iannz's [[Extensions_development_basic|tutorial]]. |
− | Programmers who want to work directly with Java or C++ rather than {{ | + | Programmers who want to work directly with Java or C++ rather than {{AOo}} Basic should consult the {{AOo}} Developer's Guide instead of this guide. {{AOo}} programming with Java or C++ is a considerably more complex process than programming with {{AOo}} Basic. |
{{InterWiki Languages BasicGuide|articletitle=Documentation/BASIC Guide}} | {{InterWiki Languages BasicGuide|articletitle=Documentation/BASIC Guide}} | ||
{{PDL1}} | {{PDL1}} | ||
[[fa:FA/Documentation/BASIC_Guide]] | [[fa:FA/Documentation/BASIC_Guide]] |
Latest revision as of 13:09, 15 February 2021
Previous Section = Previous Section | Next Section = Next Section | Previous Page = Previous Page | Next Page = Next Page |
}} ]] |
{{#switch:Next Page | Previous Section = Previous Section | Next Section = Next Section | Previous Page = Previous Page | Next Page = Next Page | }} > |
Download as a PDF or ODT
This guide provides an introduction to programming with Apache OpenOffice Basic. To get the most out of this book, you should be familiar with other programming languages. Extensive examples are provided to help you quickly develop your own Apache OpenOffice Basic programs.
![]() |
Apache OpenOffice offers a complete user interface for developing programs in Basic. It is described in the chapter Apache OpenOffice Basic of the Developer's Guide. Before attempting to write macros you should read First Steps with Apache OpenOffice Basic and the pages on Apache OpenOffice Basic IDE. Since other pages of the Developer's Guide on Basic are technical details for experienced Basic programmers, you should then read this Basic Programming Guide. |
This guide divides information about Apache OpenOffice administration into several chapters. The first three chapters introduce you to Apache OpenOffice Basic:
These chapters provide an overview of Apache OpenOffice Basic and should be read by anyone who intends to write Apache OpenOffice Basic programs. The remaining chapters describe the individual components of the Apache OpenOffice API in more detail and can be read selectively as required:
- Working with Documents
- Text Documents
- Spreadsheet Documents
- Drawings and Presentations
- Charts (Diagrams)
- Databases
- Dialogs
- Forms
About Apache OpenOffice Basic
The Apache OpenOffice Basic programming language has been developed especially for Apache OpenOffice and is firmly integrated in the Office package.
As the name suggests, Apache OpenOffice Basic is a programming language from the Basic family. Anyone who has previously worked with other Basic languages — in particular with Visual Basic or Visual Basic for Applications (VBA) from Microsoft — will quickly become accustomed to Apache OpenOffice Basic. Large sections of the basic constructs of Apache OpenOffice Basic are compatible with Visual Basic.
The Apache OpenOffice Basic programming language can be divided into four components:
- The language of Apache OpenOffice Basic: Defines the elementary linguistic constructs, for example, for variable declarations, loops, and functions.
- The runtime library: Provides standard functions which have no direct reference to Apache OpenOffice, for example, functions for editing numbers, strings, date values, and files.
- The Apache OpenOffice API (Application Programming Interface): Permits access to Apache OpenOffice documents and allows these to be created, saved, modified, and printed.
- The Dialog Editor: Creates personal dialog windows and provides scope for the adding of control elements and event handlers.
Intended Users of Apache OpenOffice Basic
The scope of application for Apache OpenOffice Basic begins where the standard functions of Apache OpenOffice end. Routine tasks can therefore be automated in Apache OpenOffice Basic, links can be made to other programs — for example to a database server — and complex activities can be performed at the press of a button by using predefined scripts.
Apache OpenOffice Basic offers complete access to all Apache OpenOffice functions, supports all functions, modifies document types, and provides options for creating personal dialog windows.
Use of Apache OpenOffice Basic
Apache OpenOffice Basic can be used by any Apache OpenOffice user without any additional programs or aids. Even in the standard installation, Apache OpenOffice Basic has all the components needed to create its own Basic macros, including:
- The integrated development environment (IDE) which provides an editor for creating and testing macros.
- The interpreter, which is needed to run Apache OpenOffice Basic macros.
- The interfaces to various Apache OpenOffice applications, which allow for direct access to Office documents.
More Information
The components of the Apache OpenOffice API that are discussed in this guide were selected based on their practical benefits for the Apache OpenOffice Basic programmer. In general, only parts of the interfaces are discussed. For a more detailed picture, see the API reference.
The Developer's Guide describes the Apache OpenOffice API in more detail than this guide, but is primarily intended for Java and C++ programmers. Anyone who is already familiar with Apache OpenOffice Basic programming can find additional information in the Developer's Guide on Apache OpenOffice Basic and Apache OpenOffice programming. Advanced programmers may wish to consult Iannz's tutorial.
Programmers who want to work directly with Java or C++ rather than Apache OpenOffice Basic should consult the Apache OpenOffice Developer's Guide instead of this guide. Apache OpenOffice programming with Java or C++ is a considerably more complex process than programming with Apache OpenOffice Basic.
Content on this page is licensed under the Public Documentation License (PDL). |