127 About OpenOffice.org Macros

 <  Day Day Up  >  

Two ways exist to automate work with OpenOffice.org:

  • Macros record keystrokes that enable you to automate certain routine tasks that you want to repeat later.

  • OpenOffice.org's Applications Programming Interface enables you to write complex, command-driven applications that run beneath the surface as you or your clients and fellow workers use OpenOffice.org documents, spreadsheets, presentations, and drawings. For example, you could use the API to create a general ledger program that uses a series of automated Calc spreadsheets that form the basis of your company's complete general ledger program. The programs written with the API might control which data is requested and when, print reports , and consolidate and close the general ledger accounts at the end of each period. Such automation requires extensive programming, but OpenOffice.org's API allows for such extensive programming.

See Also

128 Create and Use a Macro



Macros ” A series of keystrokes, menu selections, dialog box selections, and other keyboard- related activities that you save as recorded steps to be rerun later. Macros save time because you don't have to repeat the same series of steps every time you perform a repetitive task.

Applications Programming Interface ” The API , as it is known, is a programming language and interface that manipulates OpenOffice.org data and programs, enabling you to create complex applications.

Software Development Kit ” The SDK , as it is known, is an add-on that adds the program engine to your OpenOffice.org installation to support API programming.

This task and 128 Create and Use a Macro discuss macros, the simpler of the two automation tools available to OpenOffice.org users. Not only is the API extremely complex, it requires the use of programming logic as well as a separate software program called the Software Development Kit (SDK), which the standard version of OpenOffice.org doesn't come with because most OpenOffice.org users will never need the SDK.

Creating macros is simple. OpenOffice.org learns by example! As 128 Create and Use a Macro shows, when you're ready to create a macro, you only need to tell whatever OpenOffice.org program you're in at the time to begin recording your next few keystrokes. When you tell the program to stop recording the keystrokes, you save them in a named macro.

To run a macro, you assign some kind of trigger action to the macro. For example, you can place a special field inside a Calc spreadsheet that, when you click that field's area, automatically executes the macro and carries out the keystrokes you saved in the macro.



For more information on the API and SDK, see the Web site http://api.openoffice.org/.

 <  Day Day Up  >  

Sams Teach Yourself OpenOffice.org All In One
Sams Teach Yourself OpenOffice.org All In One
ISBN: 0672326183
EAN: 2147483647
Year: 2003
Pages: 205
Authors: Greg Perry

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net