I wish to change the main font used in the default style in multiple ODT documents. There are about 2,000 of them so I was wondering if there is any way of automating this please?
Many thanks,
Allan
I wish to change the main font used in the default style in multiple ODT documents. There are about 2,000 of them so I was wondering if there is any way of automating this please?
Many thanks,
Allan
As usual with this kind of question, OS name, LO version and save format are utterly important.
Also the way you format your documents is a critical factor.
Without any information, here are a few leads. Be aware that all these suggestions are valid only if your documents are .odt.
This is the best case. Change the font in the ancestor style(s) and your documents are automatically updated when you open them.
This is a bit more tedious. Group them according to their common format and layout. Create a template for each group. Use TemplateChanger extension to assign a template to your documents. This will bring you back to the previous case.
Unfortunately, you’ll have to manually associate the template to every file. There is a possibility to batch this with a script but it can damage your documents because the procedure is rather complex.
A variant not requiring to creates templates would be to modify the system default template. This will work only if your document-styles don’t override too much the factory hierarchy. That is, your custom styles derives from “generic” built-in ones like Body Text, Heading, Header & Footer, …
Patch these “nodal” styles.
Note: I never explored this venue and don’t know if you can override the system default template in your user profile.
Once again, it will work if you didn’t override the built-in styles and your custom styles depend on the “generic” styles.
Go to Tools
>Options
, LO Writer
>Basic Fonts (Western)
. You have a list of the “generic” styles and you can change font face and size.
Sorry, guy. Nothing can be done. You must edit your documents one by one. Direct formatting takes precedence over styling and masks styles and templates.
E.g. DOCX
Here again, no chance. Such alien documents must first be converted to native format. This usually implies alien formatting is translated to direct formatting. And even, if you edit/fix with styles, saving in alien format will revert to direct formatting next time you open the file.
Many thanks for this.
Windows 11, Libreoffice 24.8, ODT
I think the template changer suggestion may help with this.
All the best,
Allan