w:specVanish (Special Hidden Text)
Marks text as hidden in a way that overrides the Show Hidden Text display setting, keeping the text permanently invisible to users.
Parent elements
Description
w:specVanish is a toggle property that hides text unconditionally. Unlike w:vanish, which can be overridden by the “Show Hidden Text” view option (w:showHiddenText in settings), w:specVanish keeps text hidden even when that option is active.
It is defined in ECMA-376 Part 1 §17.3.2.37.
This is used for structural content — such as deleted list-paragraph markers in numbered lists — that must never appear as visible text.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_OnOff |
true, false, 1, 0, on, off |
Permanently hides the text. Omit to inherit. |
Examples
<!-- Structural hidden run that remains invisible regardless of display settings -->
<w:r>
<w:rPr>
<w:specVanish/>
</w:rPr>
<w:t></w:t>
</w:r>
using DocumentFormat.OpenXml.Wordprocessing;
var run = new Run(
new RunProperties(new SpecVanish()),
new Text(string.Empty)
);
Notes
w:specVanishis almost exclusively produced by Word itself for internal structural reasons; it is rarely authored manually.w:vanishis the normal “hidden text” property that users can reveal with “Show All Formatting Marks”.- Text marked with
w:specVanishstill participates in the document structure (e.g. paragraph markers) but is not rendered.