Using Macros

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 02:19, 16 May 2007 (edit)
Lorinda (Talk | contribs)
(Documentation/Support for Macros - add a link)
← Previous diff
Revision as of 12:19, 17 May 2007 (edit) (undo)
Jgd (Talk | contribs)
(typos + Categories + botlangbar -> Fr)
Next diff →
Line 1: Line 1:
==Recording a Simple Macro== ==Recording a Simple Macro==
-#Go to [meun|Tools], choose {{menu|Macros}} and then {{menu|Record Macro}}+#Go to {{menu|Tools}}, choose {{menu|Macros}} and then {{menu|Record Macro}}
-#Perform the series of steps you want the macro to do for you automatically. (For example, apply a particualr style)+#Perform the series of steps you want the macro to do for you automatically. (For example, apply a particular style)
# When you have finished all the steps, click on {{Button|Stop recording}} # When you have finished all the steps, click on {{Button|Stop recording}}
# In the window that appears, give the macro a name. # In the window that appears, give the macro a name.
Line 52: Line 52:
[http://www.ooomacros.org/ OOoMacros.org] has a library of macros available for download.<br> [http://www.ooomacros.org/ OOoMacros.org] has a library of macros available for download.<br>
In the forums at trinity, yoxi provides the code for a macro [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&p=26151#26151 to remove carriage returns]. In the forums at trinity, yoxi provides the code for a macro [http://trinity.neooffice.org/modules.php?name=Forums&file=viewtopic&p=26151#26151 to remove carriage returns].
 +
 +{{botlangbarFR|[[Fr:Comment Utiliser les Macros|Français]]}}
 +[[Category:Tips and Hints]][[Category:NeoOffice]]

Revision as of 12:19, 17 May 2007

Contents

Recording a Simple Macro

  1. Go to Tools, choose Macros and then Record Macro
  2. Perform the series of steps you want the macro to do for you automatically. (For example, apply a particular style)
  3. When you have finished all the steps, click on Stop recording
  4. In the window that appears, give the macro a name.
  5. Assign the macro to a Library and Module (See chapter 10 of the NeoOffice User Guide mentioned below for more information)
  6. Click Save when you have the settings the way you want


Saving Code as a Macro

Sometimes you may find code provided in a forum or in a text document that you want to add as a macro. To do so, follow these steps:

  • Under the Tools choose Macros then Organise Macros and Finall NeoOffice Basic...
  • Note that if the code is written in something other than NeoOffice/OpenOffice.org Basic, you need to choose the corresponding language at this point.
  • Choose the Library and Module where you want the Macro to be stored in the left panel
    • e.g. in My Macros-Standard-Module1 (it highights this by default)
  • Make sure that "Main" is highlighted in the right panel
  • click on Edit.
  • Paste the code in anywhere below the Main/End Sub lines - making sure you don't paste in the middle of any other macros you saved; a couple of lines after Main's End Sub line is an obvious choice.
  • Click Save



Assigning a Shortcut Key to a Macro

  1. Go to Tools>Customize...
  2. Click on the Keyboard tab
  3. In the Category box, scroll down to "NeoOfficeMacros" and highlight it
  4. Burrow your way down through "user" and the library and module your macros are stored in. Eventually your new macros will be listed in the Function box
  5. Highlight one of those macros
  6. In the Shorcut Keys box select the key you want to assign to that macro
  7. Set the radio button to specify if the key assignment is for all of NeoOffice or only for Writer
  8. click Modify


Documentation/Support for Macros

Chapter 10 of the NeoOffice User Guide (draft) discusses Basic and Macros.

The Getting Started with Macros Guide to OpenOffice.org can be downloaded with this link Just remember to use the command key where the OpenOffice guide says to use the control key.

Andrew Pitonyak has both a free downloadable document on OpenOffice Macros and a book that you can purchase.

The OpenOffice.org Macros and API forum is a good source of information on Macros.

See especially this thread with an extensive list of internet and print resources on Macros.



Sources of Macros

OOoMacros.org has a library of macros available for download.
In the forums at trinity, yoxi provides the code for a macro to remove carriage returns.


Cet article dans d'autres langues : Français
Personal tools