Created
December 26, 2025 23:02
-
-
Save Octagon-simon/df231e9827805fb8111b6686c7bb6971 to your computer and use it in GitHub Desktop.
This script allows you to apply double spacing between words in LibreOffice. How to run? Tools → Macros → Organize Macros → LibreOffice Basic → New → DoubleSpaceWords. Then follow the same steps again, but this time click on Run and select the module you just created.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub DoubleSpacesBetweenWords | |
| Dim oDoc As Object | |
| Dim oReplace As Object | |
| oDoc = ThisComponent | |
| ' Create a search descriptor | |
| oReplace = oDoc.createSearchDescriptor() | |
| ' Search for a single space | |
| oReplace.SearchString = " " | |
| ' Replace with double space | |
| oReplace.ReplaceString = " " | |
| ' Do global replace | |
| oReplace.SearchAll = True | |
| ' Execute replacement | |
| oDoc.replaceAll(oReplace) | |
| MsgBox "All spaces doubled!" | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment