Assign the Macro to an Event
Perhaps the most straightforward way to execute a macro's keystroke instructions is to assign the macro to a shortcut key combination that you don't use for other commands. For example, Shift+F3
isn't used throughout all of OpenOffice.org, so you could assign that keystroke to your macro.
| || |
If you had not first located your macro, OpenOffice.org could not have known you were assigning the macro you just created to a shortcut key. An argument can be made that because you just created the macro, OpenOffice.org should already have that macro selected for you when you get to the Keyboard page of this dialog box.
You can reassign some of the shortcut keys already defined by OpenOffice.org. For example, you can reassign the Ctrl+A (Select All) keystroke so your macro executes in place of the shortcut key's original intent. If the Keyboard page's Modify button is active when you select a shortcut key from the list, you can assign that keystroke to your macro.
Before selecting a shortcut key for your macro, first locate the macro in the Category
sections of the Configuration
dialog box. Scroll the Category
list until you see your macro's category, which in this and most cases (unless you stored your macro in a different library in step 3) will be inside the OpenOffice.org BASIC Macros
section. Click the plus sign to expand the libraries shown in the OpenOffice.org BASIC Macros
library section and then click to expand the Standard
library collection. Click the Module1
library, and your macro (possibly along with others) will appear in the Function
section to the right. Click to select your macro, and now you will assign a shortcut keystroke to that macro.
In the upper-right corner of the Keyboard
page, you can select either the OpenOffice.org
option or the application you've just created the macro in (such as Writer), and the list of shortcut keys shown in the Shortcut keys
list changes. You can scroll through the list to see which keys are already assigned and which are not. By selecting either the OpenOffice.org
option or your specific application, you inform OpenOffice.org that you're assigning this macro to a keystroke either globally across all OpenOffice.org programs or only in your current program (such as Writer).
Now that you've located and selected your macro, scroll the Shortcut keys
list until you locate a shortcut key that is either not assigned or one you want to reassign to your macro. When you click the Modify
button, OpenOffice.org assigns your macro to that shortcut keystroke.
The other tabs on the Configuration
dialog box control other macro triggers. For example, the Menu
page enables you to assign macros to menu commands that already exist or even to new menu commands that you want to add yourself. The Status Bar
page determines what you want to appear on the status bar, such as the current date and time if you wish (although it's slightly odd that OpenOffice.org's designers would have put this page among these other commands). The Toolbars
page determines which toolbars appear, and you can click the Customize
button to change the buttons on the toolbars and to assign your own macros to the buttons. The Events
page is where you can assign macros to specific events, such as moving and clicking your mouse over images and other triggers. For example, if you want a macro to run every time you create a new Writer document, click the Writer
option, locate your macro from the Macros
libraries, and select Create Document
from the list of events at the top of the dialog box. When you click Assign
, your macro will run every time you create a new Writer document.
If you click Save
, OpenOffice.org displays the Save Keyboard Configuration
dialog box, where you can save the current collection of keystrokes. The Load
button loads previously saved keystrokes. If you share OpenOffice.org with other workers, you might want to develop your own macros and keyboard combinations. You aren't limited to macros for new shortcut key assignments; you can, for example, scroll through the Category
sections to locate virtually any menu or keystroke action available inside OpenOffice.org, such as the boldface formatting command, and assign that action to another shortcut key. However, once you begin reassigning several keystrokes, others that use OpenOffice.org can very well be confused when their regular keys stop working as expected! So you'll want to save and load your collection of keystrokes and macros before you use OpenOffice.org and then click Reset
to reassign everything back to its original, default state once you've finished working. You can click OK
to close the Keyboard
page and the Configuration