You'll remember from Chapter 1 that we use the OOo Basic Editor to work with macros:
It's here that we can edit, run, save, and debug the code. You'll also remember that a macro is automatically created for us (Main). This is the macro that OOo will run when we click the Run button (as long as you keep Main as the first macro in the module).
Now, there's something that you may be wondering about in the definition of the macro. Why does it say:
Sub Main End Sub
Macro Main End Macro
That's because macro is actually the generic name for Subroutines and Functions, and it's these that we're going to write. Let's start ...