Skip to main content

Working with Templates & Macro

 9/12/25


 MACROS IN LIBREOFFICE WRITER

---

1: Recording a Macro

To record a macro in LibreOffice Writer.

---

#Content to Type Before Recording


```

LibreOffice Writer is an open source word processor.

```

---

#Steps


1. Open LibreOffice Writer.

2. Click Tools → Macros → Record Macro.

3. Perform the following actions:


   * Select the text.

   * Click Bold.

   * Change font size to 14.

4. Click Stop Recording.

5. Macro dialog box appears.

6. Save the macro as:


   * Name: FormatText

   * Location: My Macros → Standard → Module1

7. Click Save.


---

#Result

The macro is recorded successfully.

---


 2: Running a Macro

To run a recorded macro.

---

#Steps


1. Type the following text:


```

Macros save time and reduce repeated work.

```

2. Select the text.

3. Click Tools → Macros → Run Macro.

4. Choose:


   * My Macros → Standard → Module1 → FormatText

5. Click Run.

---

#Result

The macro is executed and the text is formatted automatically.

---

 3: Creating and Organising a Simple Macro

To create and organize a simple macro.

---


#Steps


1. Click Tools → Macros → Organize Macros → LibreOffice Basic.

2. Select My Macros → Standard.

3. Click New Module.

4. Name the module as TextMacros.

5. Enter the following code:


```basic

Sub HelloMessage

    MsgBox "Welcome to LibreOffice Writer"

End Sub

```

6. Click Save.

7. Close the editor.

---

#Running the Macro


1. Click Tools → Macros → Run Macro.

2. Select HelloMessage.

3. Click Run.

---

#Result

A message box is displayed on the screen.


---

 4: Using Macro as a Function

To use a macro as a function.

---

#Steps

1. Open Tools → Macros → Organize Macros → LibreOffice Basic.

2. Create a new module.

3. Type the following code:


```basic

Function AddNumbers(a As Integer, b As Integer)

    AddNumbers = a + b

End Function

```

4. Click Save.

---

#Using the Function


1. Go to Insert → Field → More Fields.

2. Select Functions → Macro.

3. Choose AddNumbers.

4. Enter values:

   * a = 10

   * b = 20

5. Click Insert.

---

#Result

The result 30 is displayed in the document.

---


=====================================================================

*   Working with Templates *



1. What are templates?

Templates are pre-designed documents that contain formatting styles, text, and layouts. They help you create new documents quickly without designing everything from scratch.


2. How can you create a document using a predefined template?

  • Open LibreOffice Writer

  • Go to File → New → Templates

  • Choose a template from the list

  • Click Open → A new document is created using that template.


3. Suppose you have made some changes in a template. What will you do to update the same changes in the document based on that template?

You need to update and save the template again. When the template is modified, documents created from that template can be updated by reloading the styles from the template using Update Styles.


4. What is the difference between Accept Track Change and Accept All Tracked Changes buttons?

  • Accept Track Change → Accepts only the currently selected change.

  • Accept All Tracked Changes → Accepts all changes in the entire document at once.


5. Explain the various options of the Track Changes toolbar.

The main options are:

  • Show/Hide Track Changes → Displays or hides changes.

  • Accept or Reject Changes → Approves or discards changes.

  • Previous / Next Change → Moves through the changes one by one.

  • Comments → Allows adding or reviewing comments.


6. How are comments inserted in a document?

  • Place the cursor where you want to add a comment.

  • Go to Insert → Comment (or right-click and choose Insert Comment).

  • A comment box appears in the margin where you can type your note.


7. What is the difference between importing and exporting a template?

  • Importing a template → Bringing a template from another location (like a USB or another computer) into LibreOffice.

  • Exporting a template → Saving or sending a template from LibreOffice to another location so it can be used elsewhere.



Popular posts from this blog

Digital Documentation (Advanced) using LibreOffice Writer

 Unit 1: Digital Documentation (Advanced) using LibreOffice Writer *   Chapter 1. Introduction to Styles     *   What are Styles? What are the advantages of using styles?         *   Styles are pre-defined formatting attributes in digital document processing used to apply consistent formatting to text and other elements.         *   Advantages include: consistency throughout the document, efficiency in formatting, flexibility in making changes, and improved accessibility for users with assistive technologies.     *   What are the different categories of style in LibreOffice writer document?         *   LibreOffice Writer provides six style categories:             *   Page: Defines basic page layout like size, margins, header/footer placement, footnotes, borders, and background.        ...

LibreOffice Doc's

9/12/25  INTRODUCTION TO STYLES Today we will learn about Styles. Styles help us format documents quickly, neatly, and uniformly. What is a Style? A Style is a predefined set of formatting options like font, size, color, alignment, and spacing. --- STYLES AND FORMATTING In LibreOffice Writer, the Styles and Formatting option helps us manage styles easily. To open Styles: * Press F11, or * Click Styles icon on the Sidebar.   What can we see there? Different categories of styles: * Page Styles * Paragraph Styles * Character Styles * Frame Styles * List Styles * Table Styles --- PAGE STYLES Page Styles control the entire page layout. Page Styles are used to: * Set page size * Change margins * Add headers and footers * Set page orientation Example: First page and next pages having different layouts. --- PARAGRAPH STYLES Paragraph Styles control how a paragraph looks. Paragraph Styles include: * Alignment (left, right, center, justify) * Line spacing * Indentation * Font style Exam...