How to force Fields using doc properties variables to update in LibreOffice Writer?

522 Views Asked by At

I need to display an adjusted version of the word count in the body of a document.

Right now it's possible to insert the total word count through Insert → Field → More Fields... (Document / Statistics / Words). The entire document will be taken into account when generating this number. This word count is a variable in its own right, WORD, which can be used in math formulas.

So to show the corrected word count I need, excluding the content from the title page etc, I created a new variable with a formula, WORD-8, where 8 is the number of words I'm ignoring. It works, but with one issue.

No matter how I insert this formula (Set Variable, Show Variable, Insert Formula), the resulting number won't update as I keep writing unless it's triggered by:

  1. Editing the paragraph where the formula is present. Editing some other paragraph won't work.
  2. Including the real word count (from the doc statistics tab, not as WORD) somewhere in the document. This prompts a document-wide refresh, successfully triggering the formula update.

Even saving, closing and reopening the document won't update the calculation without one of the two approachs above. Is there another automated way to keep this adjusted word count up-to-date as I write that won't visibly litter the document's body with stuff I don't need? Being forced to display the actual number is what's keeping me from just using the method 2.

1

There are 1 best solutions below

0
On BEST ANSWER

Hitting F9 should force updating of fields. Note also that it may be necessary to use Ctrl+Shift+F9 to update any Input Fields in a document. See Shortcut Keys for LibreOffice Writer and Update fields (F9) not working.