Difference between revisions of "Documentation/FAQ/Macros"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 2: Line 2:
 
{{Documentation/NeedsRework}}
 
{{Documentation/NeedsRework}}
 
{{DISPLAYTITLE:{{OOo}} Macros FAQ}}
 
{{DISPLAYTITLE:{{OOo}} Macros FAQ}}
 +
 +
 +
<DPL>
 +
  category=Documentation/FAQ/Macros
 +
  replaceintitle=/Documentation.*\//,
 +
  include={Documentation\/QASet}:Question
 +
  secseparators=<br>
 +
</DPL>
 +
 +
<table border=0><tr><td>
 +
<inputbox>
 +
type=create
 +
default=Documentation/FAQ/Macros/<INSERT FAQ TOPIC>
 +
preload=Documentation/FAQ_Template
 +
width=80
 +
buttonlabel=Add new FAQ
 +
break=no
 +
</inputbox>
 +
</td></tr></table>
  
 
==How can I record a macro?==
 
==How can I record a macro?==

Revision as of 13:49, 14 March 2008

doc OOo





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.

The above is incorrect:

  1. Go to Tools > Customize.
  2. Select Keyboard Tab.
  3. Under Category, select OpenOffice.org Macros.
  4. Browse to the Macro containing the desired Function.
  5. Under Function, select the desired function.
  6. Under Shortcut keys, browse to and select the desired shortcut key.
  7. Click on Modify. The shortcut key now appears under Keys.

How can I make a macro available for all new docs?

  1. Open the document containing the macro.
  2. Go to Tools > Macro > Macro.
  3. On the Macro dialog, click on Organizer.
  4. On the macro organizer dialog, click on the Libraries tab.
  5. Make sure that soffice is selected under Application/Document. Then click on Append.
  6. Select .odt and click on Open. Make sure that the library called is selected. NOTE: The library called Standard should not be selected. Then press OK.

The library should now be available to every OpenOffice.org document.

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