Difference between revisions of "Documentation/FAQ/Macros"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 +
==How can I record a macro?==
 +
Go to <b>Tools > Macros > Record Macro</b>, then press the sequence of keystrokes you want. At the end of your sequence click on <b>Stop Recording</b>. In the new window that pops up, give the file a name and save it under <b>soffice > Standard > Module1</b>.
 +
 +
 +
==How can I assign a macro to a key?==
 +
# Go to <b>Tools > Macros > Macro...</b>, select the macro you wish to assign to a keystroke, then click <b>Assign</b>.
 +
# Under the <b>Keyboard</b> tab, select some unused key for this action, like <b>F3</b> for instance.
 +
# Click on <b>Modify</b>, then <b>OK</b>, then <b>Close</b>.
 +
 +
Now an <b>F3</b> keystroke will run the macro. If you save it under <b>soffice</b>, it will be available in all your OpenOffice.org documents.
 +
 +
 +
==Can I use my Microsoft Office macros?==
 +
Even though the OpenOffice.org macros are written in a form of StarBASIC, it isn't the same as what Microsoft uses. Macros written for MS Word or Excel for instance cannot be executed via OpenOffice.org; you'll need to re-write them. This has its benefits - it makes OOo documents less virus prone.
 +
 +
 
==Where can I find more info about macros?==
 
==Where can I find more info about macros?==
 
The OpenOffice.org [http://api.openoffice.org/ API project] is the OOo project that works the most with macros.
 
The OpenOffice.org [http://api.openoffice.org/ API project] is the OOo project that works the most with macros.
 
   
 
   
additional resources for macros:
+
Additional resources for macros:
  
 +
* [http://www.oooforum.org/forum/viewforum.php?f=9">Macros and API Forum]
 
* [http://scripting.openoffice.org/ Scripting Project]
 
* [http://scripting.openoffice.org/ Scripting Project]
 
* [http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html Developer's Guide]
 
* [http://api.openoffice.org/DevelopersGuide/DevelopersGuide.html Developer's Guide]

Revision as of 10:39, 11 August 2007

How can I record a macro?

Go to Tools > Macros > Record Macro, then press the sequence of keystrokes you want. At the end of your sequence click on Stop Recording. In the new window that pops up, give the file a name and save it under soffice > Standard > Module1.


How can I assign a macro to a key?

  1. Go to Tools > Macros > Macro..., select the macro you wish to assign to a keystroke, then click Assign.
  2. Under the Keyboard tab, select some unused key for this action, like F3 for instance.
  3. Click on Modify, then OK, then Close.

Now an F3 keystroke will run the macro. If you save it under soffice, it will be available in all your OpenOffice.org documents.


Can I use my Microsoft Office macros?

Even though the OpenOffice.org macros are written in a form of StarBASIC, it isn't the same as what Microsoft uses. Macros written for MS Word or Excel for instance cannot be executed via OpenOffice.org; you'll need to re-write them. This has its benefits - it makes OOo documents less virus prone.


Where can I find more info about macros?

The OpenOffice.org API project is the OOo project that works the most with macros.

Additional resources for macros:

Personal tools