ENDEDemo vereinbaren
← Zurück zu allen Aufgaben

LibreOffice Impress

Do you have any suggestions on how to modify the font for all text boxes in an Impress presentation? I want to standardize the font to 'Liberation Sans Narrow', but I don't want to manually select each individual text box.

Aufgabe und Verlauf liegen im englischen Original vor.

Ergebnis
Gelöst
Punkte
1 / 1
Schritte
12
Dauer
9 min 27 s

Bewertungskriterien

  • Checks that the presentation matches the expected one: slides, text, formatting and layout.
Aufgabendefinition im OSWorld-Repository ansehen

Abschließende Antwort

Done! I've changed all text fonts in the presentation to 'Liberation Sans Narrow' using a LibreOffice Basic macro. The macro iterated through all 28 slides, every shape with text, and each text portion to set the font. The file has been saved in .pptx format. For future reference, here's the approach I used: 1. Open Tools > Macros > Edit Macros in LibreOffice Impress 2. Write a macro that loops through all slides (DrawPages), all shapes, and all text portions, setting CharFontName to "Liberation Sans Narrow" 3. Run the macro (F5) 4. Save the file This is much faster than manually selecting each text box individually!

Verlauf

  1. Schritt 10:01

    The user wants to standardize all fonts in the presentation to 'Liberation Sans Narrow' without manually selecting each text box. The best in-app approach is to use a LibreOffice Basic macro that iterates through all slides, all shapes, and all text runs, changing the font name. This is more thorough than the Master Slide approach (which only affects inherited formatting) and keeps the work inside the app (per KB rules about not using python-pptx on open files). I'll draft a plan to write and run a Basic macro, then save.

    • Plan erstellt
      1. Open the LibreOffice Basic IDE and write a macro to change all text fonts to 'Liberation Sans Narrow' across all slides
      2. Run the macro to apply the font change to all text boxes in the presentation
      3. Save the file in .pptx format
    • Plan bestätigt3 Teilziele
  2. Schritt 21:43

    I need to open the LibreOffice Basic IDE to write a macro. I'll go to Tools > Macros > Edit Macros (or Tools > Basic IDE) to open the macro editor.

    • Klickthe Tools menu in the menu bar
  3. Schritt 32:08

    I need to click on 'Macros' to open its submenu, which should show options to open the Basic IDE or edit macros.

    • Klickthe 'Macros' menu item in the Tools dropdown
  4. Schritt 42:38

    I need to click 'Edit Macros...' to open the LibreOffice Basic IDE where I can write a macro to change all fonts to 'Liberation Sans Narrow'.

    • Klickthe 'Edit Macros...' option in the Macros submenu
  5. Schritt 52:59

    I need to replace the existing code with my macro. I'll click in the code editor area, select all with Ctrl+A, then type the new macro that iterates all slides, shapes, paragraphs and text portions to set CharFontName to 'Liberation Sans Narrow'.

    • Klickthe code editor area in the Basic IDE, near the 'Sub Main' line
    • Tastenkombinationctrl+a
    • EingabeSub ChangeAllFonts() Dim oDoc As Object Dim oSlides As Object Dim oSlide As Object Dim oShape As Object Dim oText As Object Dim oEnum As Object Dim oPara As Object Dim oParaEnum As Object Dim oPortion As Object Dim i As Integer Dim j As Integer oDoc = ThisComponent oSlides = oDoc.DrawPages For i = 0 To oSlides.Count - 1 oSl…
  6. Schritt 63:57

    The macro code is now visible in the Basic IDE editor. I can see the complete ChangeAllFonts sub. Now I need to run it by pressing F5 or clicking the Run button in the toolbar.

    • TastenkombinationF5
  7. Schritt 74:20

    I need to click OK to dismiss the dialog, then switch back to LibreOffice Impress and save the file in .pptx format.

    • Klickthe OK button in the message box
  8. Schritt 84:48

    The macro has been written and executed successfully. Now I need to switch back to the Impress window and save the file in .pptx format. I'll use the Window menu or click on the Impress taskbar item.

    • Teilziel erreichtWrote ChangeAllFonts macro in Basic IDE that iterates all slides, shapes, and text portions setting CharFontName to 'Liberation Sans Narrow'
    • Teilziel erreichtRan the macro successfully - all text in all 28 slides now uses 'Liberation Sans Narrow' font
    • Klickthe Window menu in the Basic IDE menu bar
  9. Schritt 95:13

    I need to click on the Impress window to switch to it, then save the file with Ctrl+S to save in .pptx format.

    • Klickthe 'note-taking-strategies.pptx - LibreOffice Impress' option in the Window menu
  10. Schritt 105:37

    Now I need to save the file in .pptx format. I'll press Ctrl+S to save. Since the file is .pptx, LibreOffice will show a dialog asking whether to keep the PowerPoint format or save as ODP. I need to choose 'Keep Current Format' to save as .pptx.

    • Tastenkombinationctrl+s
  11. Schritt 115:59

    The file appears to have been saved. However, to be safe, let me try Ctrl+S once more to confirm - if a 'Keep in PowerPoint format?' dialog appears, I'll click the right button. If nothing happens, the file is already saved.

    • Tastenkombinationctrl+s
  12. Schritt 126:38

    The file was saved successfully. All three subgoals are now complete: the macro was written, executed, and the file was saved. I should mark the final subgoal as done and finish the task.

    • Teilziel erreichtFile saved in .pptx format with all fonts changed to Liberation Sans Narrow
    • Als abgeschlossen gemeldet