OpenOffice.org OpenOffice - 3.0 Quick Start Guide Page 370

  • Download
  • Add to my manuals
  • Print
  • Page
    / 433
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 369
Figure 316: Select your macro and click Run
There are other methods to run a macro. For example, use Tools >
Macros > Organize Macros > OpenOffice.org Basic to open the
macro organizer, which contains a Run button as well. The author, an
avid macro writer, prefers the macro organizer because the dialog
usually opens faster, but the selection process may be slightly slower.
Viewing and editing the macro
You can view and edit the macro that was just created. Use Tools >
Macros > Organize Macros > OpenOffice.org Basic to open the
OpenOffice.org Basic Macros dialog (see Figure 316). Select the new
macro and click Edit to open the macro in the Basic IDE (Integrated
Development Environment).
Listing 1: Generated “EnterMyname” macro.
REM ***** BASIC *****
Sub Main
End Sub
sub EnterMyName
rem -------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem -------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
370 Getting Started with OpenOffice.org 3
Page view 369
1 2 ... 365 366 367 368 369 370 371 372 373 374 375 ... 432 433

Comments to this Manuals

No comments