22.01.2015 Views

OpenOffice.org Macros Explained - LibreOffice-NA.US

OpenOffice.org Macros Explained - LibreOffice-NA.US

OpenOffice.org Macros Explained - LibreOffice-NA.US

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table of Contents<br />

General Information...................................................................................................................1<br />

Table of Contents........................................................................................................................i<br />

1. Introduction and housekeeping...........................................................................................11<br />

1.1. Comments from the author..........................................................................................11<br />

1.2. <strong>OpenOffice</strong>.<strong>org</strong> Bug....................................................................................................11<br />

1.3. Environment and comments........................................................................................11<br />

2. Getting Started....................................................................................................................12<br />

2.1. Macro storage..............................................................................................................12<br />

2.1.1. Library container.................................................................................................12<br />

2.1.2. Libraries...............................................................................................................13<br />

2.1.3. Modules and dialogs............................................................................................14<br />

2.1.4. Key points............................................................................................................14<br />

2.2. Creating new modules and libraries............................................................................14<br />

2.3. Macro language...........................................................................................................16<br />

2.4. Create a module in a document...................................................................................16<br />

2.5. Integrated Debugging Environment............................................................................19<br />

2.6. Enter the macro...........................................................................................................22<br />

2.7. Run a macro................................................................................................................23<br />

2.8. Macro security.............................................................................................................23<br />

2.9. Using breakpoints........................................................................................................26<br />

2.10. How libraries are stored............................................................................................26<br />

2.11. How documents are stored........................................................................................27<br />

2.12. Conclusion.................................................................................................................28<br />

3. Language Constructs...........................................................................................................29<br />

3.1. Compatibility with Visual Basic.................................................................................30<br />

3.2. Variables.....................................................................................................................31<br />

3.2.1. Constant, subroutine, function, label, and variable names..................................31<br />

3.2.2. Declaring variables..............................................................................................31<br />

3.2.3. Assigning values to variables..............................................................................34<br />

3.2.4. Boolean variables are True or False....................................................................34<br />

3.2.5. Numeric variables................................................................................................35<br />

Integer variables.........................................................................................................36<br />

Long Integer variables...............................................................................................37<br />

Currency variables.....................................................................................................37<br />

Single variables..........................................................................................................38<br />

Double variables........................................................................................................38<br />

3.2.6. String variables contain text................................................................................38<br />

3.2.7. Date variables......................................................................................................39<br />

3.2.8. Create your own data types.................................................................................41<br />

3.2.9. Declare variables with special types....................................................................42<br />

3.2.10. Object variables.................................................................................................42<br />

i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!