w:suppressOverlap (Prevent Text Frame Overlap)
Prevents a text frame paragraph from overlapping with other text frames that are positioned nearby.
Parent elements
Description
w:suppressOverlap is a toggle property that, when applied to a text frame paragraph (one that has w:framePr), instructs the processor to reposition the frame so it does not visually overlap with adjacent text frames on the same page.
It is defined in ECMA-376 Part 1 §17.3.1.36.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_OnOff |
true, false, 1, 0, on, off |
Prevents frame overlap when true. Omit to inherit. |
Examples
<w:p>
<w:pPr>
<w:framePr w:w="3600" w:h="720" w:hAnchor="margin" w:vAnchor="margin"
w:x="0" w:y="0" w:wrap="around"/>
<w:suppressOverlap/>
</w:pPr>
<w:r><w:t>Frame that will not overlap others.</w:t></w:r>
</w:p>
using DocumentFormat.OpenXml.Wordprocessing;
var para = new Paragraph(
new ParagraphProperties(
new FrameProperties
{
Width = "3600", Height = "720",
HorizontalAnchor = HorizontalAnchorValues.Margin,
VerticalAnchor = VerticalAnchorValues.Margin,
X = "0", Y = "0", Wrap = TextWrappingValues.Around
},
new SuppressOverlap()
),
new Run(new Text("Frame that will not overlap others."))
);
Notes
- Only meaningful for paragraphs that define
w:framePr(legacy text frames). - Modern floating objects use
wp:anchorin DrawingML and have separate overlap controls.