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.
- Result
- Solved
- Points
- 1 / 1
- Steps
- 12
- Duration
- 9 min 27 s
Evaluation criteria
- Checks that the presentation matches the expected one: slides, text, formatting and layout.
Final response
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!
Trajectory
Step 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 created
- Open the LibreOffice Basic IDE and write a macro to change all text fonts to 'Liberation Sans Narrow' across all slides
- Run the macro to apply the font change to all text boxes in the presentation
- Save the file in .pptx format
- Plan confirmed3 subgoals
- Plan created
Step 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.
- Clickthe Tools menu in the menu bar
Step 32:08
I need to click on 'Macros' to open its submenu, which should show options to open the Basic IDE or edit macros.
- Clickthe 'Macros' menu item in the Tools dropdown
Step 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'.
- Clickthe 'Edit Macros...' option in the Macros submenu
Step 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'.
- Clickthe code editor area in the Basic IDE, near the 'Sub Main' line
- Key press
ctrl+a - Type
Sub 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…
Step 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.
- Key press
F5
- Key press
Step 74:20
I need to click OK to dismiss the dialog, then switch back to LibreOffice Impress and save the file in .pptx format.
- Clickthe OK button in the message box
Step 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.
- Subgoal completedWrote ChangeAllFonts macro in Basic IDE that iterates all slides, shapes, and text portions setting CharFontName to 'Liberation Sans Narrow'
- Subgoal completedRan the macro successfully - all text in all 28 slides now uses 'Liberation Sans Narrow' font
- Clickthe Window menu in the Basic IDE menu bar
Step 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.
- Clickthe 'note-taking-strategies.pptx - LibreOffice Impress' option in the Window menu
Step 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.
- Key press
ctrl+s
- Key press
Step 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.
- Key press
ctrl+s
- Key press
Step 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.
- Subgoal completedFile saved in .pptx format with all fonts changed to Liberation Sans Narrow
- Reported as completed