Ch 5: Using Macros
What is a Macro?
Enable: Tools > Options > LibreOffice > Advanced → tick "Enable macro recording". Record: Tools > Macros > Record Macro → do actions → Stop Recording.
Macro in BASIC
Macros are written in BASIC. Code begins with Sub <name> and ends with End Sub. A macro-as-function uses Function … End Function and returns a value.
Summary
- A macro automates repeated tasks; recording must be enabled first.
- Library > Module > Macro. Code: Sub … End Sub, written in BASIC.
- The recorder works only in Calc and Writer.
Macro क्या है?
Enable: Tools > Options > LibreOffice > Advanced → "Enable macro recording" tick करें। Record: Tools > Macros > Record Macro → actions करें → Stop Recording।
BASIC में Macro
Macros BASIC में लिखे जाते हैं। Code Sub <name> से शुरू और End Sub पर खत्म। Macro-as-function Function … End Function use करता है और value return करता है।
सारांश
- Macro दोहराए जाने वाले काम automate करता है; पहले recording enable करें।
- Library > Module > Macro। Code: Sub … End Sub, BASIC में।
- Recorder सिर्फ़ Calc और Writer में काम करता है।
Frequently Asked Questions
In which language are LibreOffice macros written?
Macros are written in the BASIC language, beginning with Sub and ending with End Sub.
What are the rules for naming a macro?
A macro name must begin with a letter, contain no spaces, and no special characters except the underscore.