Ask Your Question

Updating many files with a template change

asked 2020-03-10 08:31:57 +0200

doktoroblivion gravatar image

Is there an extension or other procedure to update many sub-documents with a template change, other than opening, clicking on the update-styles button and saving each document individually?

edit retag flag offensive close merge delete


It only matters when you transmit the files to someone else. If the files stay on your computer (and same account), next time you edit the document, the update will occur. If you never edit the document, why would you bother to update styles?

ajlittoz gravatar imageajlittoz ( 2020-03-10 09:07:04 +0200 )edit

@ajlittoz, I do not think you totally understood the question. For example, I have 100+ .odt files that are part of a master document. If I make a template change, it forces me to go into every one of those 100+ .odt files to get the template update. Has someone written an extension or other program to just perform a template update change to all master and sub- documents one may own?

doktoroblivion gravatar imagedoktoroblivion ( 2020-03-10 09:26:31 +0200 )edit

@doktoroblivion: you're right, I misunderstood. But you didn't mention "master", only "sub" which is not enough.

ajlittoz gravatar imageajlittoz ( 2020-03-10 15:53:18 +0200 )edit

You didn't mention your OS, but I assume it has some shell capability.

You could launch soffice.bin on all documents contained in a folder in --headless mode. Unfortunately, I don't practice this batch mode and don't know if there is an option to cause style update acceptance. Built-in help does not give glues for that.

ajlittoz gravatar imageajlittoz ( 2020-03-10 16:02:17 +0200 )edit

@ajlittoz, ah okay, that's better than nothing. I am a Linux developer that uses Win10 from time to time and did not know that LO offered a headless mode. I will check that out and whether or not there are other things I can do on the CL. Perhaps using a small bash script I can provide acks to the popup, save and close each. Will update this when I have tried it.

doktoroblivion gravatar imagedoktoroblivion ( 2020-03-11 08:07:26 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2020-05-06 13:07:02 +0200

doktoroblivion gravatar image

I have not tried to create and extension nor run in headless, the answer I have been using is to use the template change extension and reassign a documents template when I get into this trouble.

edit flag offensive delete link more

answered 2020-05-07 19:05:14 +0200

jaragon gravatar image

The Template Changer extension has a command to assign a new template to all the documents in a folder and, optionally, all sub-folders. Because this is a bulk change, as a safety precaution, it does not change the documents in the original source folder. It creates copies, with the new template assignment, in a target folder. You can copy the new documents back into the original folder once you've spot-checked a few files and a re satisfied that the change was made correctly.

This does not apply the changes to an existing template, it applies a new template. But you could accomplish what you want by making a copy of your changed template with a different name, and then applying that new template to your files. If you need to keep the same template name, you could run this process again, this time switching back to the original template.

After the extension is installed, the command is File > Templates > Change template (folder)...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-03-10 08:31:57 +0200

Seen: 57 times

Last updated: May 07