w:suppressAutoHyphens (Suppress Automatic Hyphenation)
Prevents automatic hyphenation from being applied to the paragraph.
Parent elements
Description
w:suppressAutoHyphens is a toggle property that disables automatic hyphenation for the paragraph in which it appears. Even when automatic hyphenation is enabled at the document level (via w:autoHyphenation in w:settings), individual paragraphs can opt out using this property.
It is defined in ECMA-376 Part 1 §17.3.1.33.
As with all ST_OnOff toggle properties, omitting w:val is equivalent to true.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:val |
ST_OnOff |
true, false, 1, 0, on, off |
When true, automatic hyphenation is suppressed for this paragraph. |
Examples
<!-- Paragraph with automatic hyphenation suppressed -->
<w:p>
<w:pPr>
<w:suppressAutoHyphens/>
</w:pPr>
<w:r><w:t>This paragraph will not be automatically hyphenated.</w:t></w:r>
</w:p>
using DocumentFormat.OpenXml.Wordprocessing;
var para = new Paragraph(
new ParagraphProperties(
new SuppressAutoHyphens()
),
new Run(new Text("This paragraph will not be automatically hyphenated."))
);
Notes
- Useful for paragraphs containing proper nouns, technical terms, or formatted code where hyphenation would be misleading.
- Manual hyphens (soft hyphens, U+00AD) inserted inside runs are not affected by this property.
- The document-level setting
w:doNotHyphenateCapsalso suppresses hyphenation for words in all-capital letters.