w:pPrDefault (Default Paragraph Properties)
Specifies the default paragraph formatting properties applied to all paragraphs in the document unless overridden by a style.
Parent elements
Child elements
Description
w:pPrDefault contains a w:pPr child that defines the document-wide default paragraph formatting. Any paragraph property not set by a style or direct formatting falls back to these defaults.
It is defined in ECMA-376 Part 1 §17.7.5.2.
w:pPrDefault lives inside w:docDefaults in styles.xml.
Attributes
None. All defaults are expressed through the child w:pPr.
Examples
<w:docDefaults>
<w:pPrDefault>
<w:pPr>
<w:spacing w:after="160" w:line="259" w:lineRule="auto"/>
</w:pPr>
</w:pPrDefault>
</w:docDefaults>
using DocumentFormat.OpenXml.Wordprocessing;
var docDefaults = new DocDefaults(
new ParagraphPropertiesDefault(
new ParagraphPropertiesBaseStyle(
new SpacingBetweenLines
{
After = "160",
Line = "259",
LineRule = LineSpacingRuleValues.Auto
}
)
)
);
Notes
w:pPrDefaultis overridden by paragraph styles, which are in turn overridden by direct formatting.- The element may be empty if no default paragraph properties are explicitly set.