Desktop Survival Guide
by Graham Williams
Google Macro Support

To simplify the creation of documents which include odfWeave commands, macros can be defined (thanks to David Winsemius for the suggestion). Macros can be bound to keyboard shortcuts to insert the various markup.

To create a macro to insert \Sexpr{ }, for example, start Writer and:

  1. From the menus: Tools/Macro/Record Macro...
    A small window opens with a button to allow you to stop recording the macro.
  2. Type the string you want: For example, \Sexpr{ }.
  3. Click the Stop Recording button.
    A Basic Macros dialogue will appear with the names of existing macros.
  4. Type in the name of the new macro: For example, sexpr.
Now we want to associate the macro with a keyboard shortcut, perhaps Ctrl-6:
  1. From the menus: Tools/Cutomize/Keyboard.
  2. Choose Ctrl-6 (or any other unused key combination).
  3. Within Functions:Category, expand the Macros entry.
  4. Expand user, then Standard, then click Module1
    The sexpr macro name will appear in the Function column.
  5. Click Modify along the upper right side of the dialogue box.
  6. Click OK to exit.

Now, pressing Ctrl-6 within an Writer document and the template will be inserted.

Copyright © Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
The PDF version is a formatted comprehensive draft book (with over 800 pages).
Brought to you by Togaware. This page generated: Sunday, 22 August 2010