Changing a field entry across multiple documents

I got 17 documents, same layout and content. I am using fields to change usernames in the footer. I only need to change the name field in the footer. I wonder if there is indeed only a manual approach for this task?

  1. Many documents use have more than one pagestyles and may then have more than one footers. How select?
  2. Any footer can contain more than one fields of the same type. How select.
  3. The term “name field” isn’t well defined.
    It may be a Set variable field named “name”? Something else?

If you know how to select the objects you actally mean you can write user code for the purpose. To do it for an extremely special case will not pay. To generalse it would require to also write a manual.

You surely know that you can search for your 17 document files using the search tool of your file manager (OS?) or simply going to their common folder. Having selected all the files there, you can open them all at once with LibreOffice (two clicks). Make the change you want for the first file, copy the edited field to your clipboard, and close the file saving it.
Now yo have the second document in the view. Select the old field, delete it, and paste the new one from your clipboard.
Store and close the second file … and so on.
For 17 document you will do that in less than a minute.
No special tool with lots of options needed.

1 Like

I have 5 co workers, it is manageable. Your solution is great. I did not know I can open all documents at once. Thank you.

I’d suggest a slight change in your document.

Your “username” field is probably the author’s name or something equivalent which doesn’t change in the document.

Such a “constant”, if it is not a built-in “automatic field” managed by Writer (filename, creation date, page count, …), can be defined in File>Properties, Custom Properties. Insert the corresponding field wherever you need it.

To change such a custom property, reopen File>Properties and change its value there. The change takes effect immediately for all occurrences of the field.

1 Like

Thanks for your suggestion. But I am not sure I understand why this would help me.
I tried Name Document number, Type Number, Value 1. But what do I gain with this custom property?

This custom property is a field. You use it like any other (built-in) field where you need its value.

Your gain is a much clearer organisation of your document without interference between contents and metadata.

Without it, you define a variable near the beginning of the document, but you must hide the definition so that it does not affect your text. This makes it more difficult to find the definition to change its value, with many error risks which will damage the text.

Usually, the “definition block” for the variables results in a “clumsy” and fragile document. The separation ensures that you don’t break anything in your text and styling.

1 Like

Okay thanks, I think I get it now. But I noticed one drawback of this approach: You have to fill in custom properties in every single document. It is not reflected in a template. With “regular” fields I have to do it once and it is reflected in all my documents with help of a template.

You’re right. There is presently a limitation in “templated” custom properties: they are considered initial text and changes are not forwarded to slave document.

What was not clear in your initial question is the fact that the field definition/value is common to several documents.

The only way is see to handle your problem is to use master+sub-documents. Your “definition block” (ordinary variable definition) is imported from a common shared sub-doc. But is it worth the complication of the master feature?

Okay digging deeper is not always fun. But I am really struggling with templates. You never know which one is used plus “template” manager is looking for templates that are long deleted, plus LO writer “overwriting” policy is strange (why adding numbers and not really overwrite the file, Dialog box is really redundant in this case. Don’t ask if you are not overwriting anyway)

A little addon rant: using custom fields in my masterdocument works but only in Portrait mode. All landscape Pages need extra editing. Probably totally unsurprising for LO afficionados, but for a dummy another cooler.

Don’t understand what you mean here. The temlate path for based documents is recorded in metadata. But the path is stored in relative form (relative to the document location). Consequently if you aren’t carerful enough when moving around your files, you may lose the connection with the template.

Which one? The precedence rule between styles? Or something related to templates? In the latter case, always modify your templates with File>Templates>Edit Template and save with usual Faile>Save. Thus you edit “in-place” without creating new files.

Tell me more. Maybe attach sample files for analysis.

Don’t understand what you mean here. The temlate path for based documents is recorded in metadata. But the path is stored in relative form (relative to the document location). Consequently if you aren’t carerful enough when moving around your files, you may lose the connection with the template.

Somehow my default template file is not in existence anymore, whenever I try to open a new writer file LO writer tells me with a little pop-up window, it can not open the default template. (obviously) The thing is I already gave LO writer a new default template, but it does not help. LO writer insists on the old version.

For illustration purposes:
LOwriter

PS: Maybe this “template changer” is a solution? template changer

LO writer “overwriting” policy

Your post from 2019 describes best what I am struggling with today.