Want to add fields to Insert > Fields list - Writer 7.4 on Fedora Linux

I’ve looked thru the documentation, run various internet searches and even asked ChatGPT (which gave an inaccurate answer) and here’s the question:

I want to add either a “name” field from Document Properties tab (under Document Properties) or a field under Fields > DocInformation > Custom to the list that appears under Insert > Fields above “More Fields”. If I can’t add any, is it possible to rename one or more of them? There are a couple in that list that I don’t use or need.

The closest I got to an answer was with ChatGPT which said there was a list in the registrymodifications.xcu file; I couldn’t find any such listing.

There’s gotta be a list somewhere - can anyone help me with this? Did I miss something in the user documentation?

Thanks.

It looks like Tools>Customize has no tool to modify the Insert>Field … submenu which is probably internally managed.

However, you can implement a work around:

  1. Insert you custom field into your document text as usual (with Insert menu and subdialog)
  2. Select what you have inserted
  3. Tools> AutoText
    Give it a name and a shortcut
  4. Press AutoText, then New

When you want to insert your field, either type the name (if there is no space in it) or the shortcut, immediately followed by F3.

PS: when asking here, always mention OS name, LO version and save format.

Thanks, Ajlittoz. That works & it’s no additional keystrokes.

I thought using Fedora Linux & Writer 7.4 in the title would be sufficient. I didn’t specifiy the “save” format; didn’t think it’d matter.

Thanks again.

If Word format does not support a feature that is available in Writer then it might be different on re-opening after save and close. See [Tutorial] Differences between Microsoft and AOO/LO files

Good point. Since I haven’t used Word for many years, I didn’t consider the doc format.

Sorry, I misread the title, only focusing on the description. My workflow is to select the question base on titles and tags in the home page then to read only the description and think about a possible answer. I’ll be more careful in the future.

One can consider adding a submenu with items:

  • item to insert e.g. custom field (assigned macro, recorded in UI or written)
  • any item from the Insert ⟶ Field … submenu as needed

I was able to add “Insert > myFields > CustomProp” under the “Insert” dropdown and, even with two Custom Properties set up in Document Properties, the “myFields > CustomProp” link is grayed out. I"m obviously missing a step, maybe two; Would you please walk us through how that is set up?

Thanks!

Below I summarize what I did to get a submenu with one item that inserts a document property into the document content.

  1. Record and save a macro that inserts a document property (field) into the document.
  2. Under Tools ⟶ Customize ⟶ Menus tab insert a submenu.
  3. In the “Category” drop-down choose “Macros”.
  4. In the “Available Commands” list select the said macro and add it to the submenu
    (the “Assigned Commmands” list).
  5. Accept the changes.

Thank you for this. I don’t, unfortunately, know how to write such a macro for LO. If you can pass your code along, I’d be very appreciative. Or, if the macro instructions in any of the documentfoundation.org guides will provide the information, which guide should I look at? (Pitonyak’s books, according to him, are out-of-date, but if the information I need can be found in his online materials, please let me know and I’ll try writing the macro from there. I am not a programmer…)

See point 1. in my last post again.
You don’t have to write the macro yourself, the macro recorder should do it for you.

Here is an example for the document custom property called “myPROP”.

HowTo

Sorry for delay in responding. This helped immensely - thanks much!