Content inside a Word field

docx.field-instruction

A Word field's instruction carries prose, and Word shows only the field's result.

How the text is hidden

A field is a directive Word evaluates and swaps for a result: { PAGE } becomes a number, { TOC \o "1-3" } becomes a table of contents. The instruction lives in w:instrText runs inside a complex field, or in the @w:instr attribute of a w:fldSimple. It is never shown to a reader. Word also splits one instruction across several w:instrText elements at rsid, proofing and language boundaries.

Why a model still reads it

The instruction is text the file carries and the page does not show. Extractors that read the part return it, and before 0.132.0 this engine pushed the whole raw instruction — switches included — into the caller's canonical text.

What we do about it

Fragments are joined back into whole instructions before anything is classified, keyed on the start so a split field is emitted once. Each type is then judged by its own grammar: directive types report only what survives stripping switches and unwrapping quotes, and only when the word count reaches limits.fieldInstructionMinContentWords; reference types (HYPERLINK, INCLUDETEXT, DDEAUTO and siblings) report an argument that is not a plausible target; types that legitimately hide text (IF, QUOTE, FILLIN, ASK, SET, MACROBUTTON, GOTOBUTTON, and the merge blocks) always report their arguments; ADDIN has its known reference-manager markers removed and its structured payload collapsed before what is left is judged; an unrecognised type reports the whole instruction. Only the content becomes a run, with reason non-rendered-part. The rule fires at informational, action flag, and the parser withholds a provenance range so the cleaner has nothing to edit.

How often it fires

0.50% of open-data portal DOCX — 200 real government publications, written in Word (genre: government, NOT contracts), measured 2026-08-23.

This is an alert-volume number and nothing else. It says how often the alarm sounds on documents as found — not how often it is right, and not whether what it found was harmless. Documents as found may themselves carry concealment. Read it against the population named above rather than as a property of documents in general.

next

Check your own file

Three commands: a key, credit, a verdict.

Start with the API