Spacing Class

Defines the Spacing Class.When the object is serialized out as xml, its qualified name is w:spacing.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


Public Class Spacing _
    Inherits OpenXmlLeafElement
Dim instance As Spacing
public class Spacing : OpenXmlLeafElement


[ISO/IEC 29500-1 1st Edition] spacing (Character Spacing Adjustment)

This element specifies the amount of character pitch which shall be added or removed after each character in this run before the following character is rendered in the document. This property has an effect equivalent to the additional character pitched added by a document grid applied to the contents of a run.

If this element is not present, the default value is to leave the formatting applied at previous level in the style hierarchy. If this element is never applied in the style hierarchy, then the run shall not have any additional character pitch applied to any character in its contents.

[Example: Consider a run of text which must have ten points of additional character spacing explicitly added to each character within the contents of the run. This constraint is specified using the following WordprocessingML:

<w:spacing w:val="200"/>

This run explicitly declares that the spacing value is 200, so the contents of this run appear as if they have 10 additional points of spacing added between them. end example]

Parent Elements

rPr (§; rPr (§; rPr (§; rPr (§17.9.25); rPr (§; rPr (§; rPr (§; rPr (§; rPr (§; rPr (§



val (Positive or Negative Value in Twentieths of a Point)

Specifies a positive or negative measurement in twentieths of a point (equivalent to 1/1440th of an inch).

The contents of this measurement shall be interpreted based on the context of the parent XML element.

[Example: Consider an attribute value of -720 whose type is ST_SignedTwipsMeasure. This attribute value specifies a value of negative one-half of an inch or -36 points (-720 twentieths of a point = -36 points = -0.5 inches). end example]

The possible values for this attribute are defined by the ST_SignedTwipsMeasure simple type (§17.18.81).

[Note: The W3C XML Schema definition of this element’s content model (CT_SignedTwipsMeasure) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


Spacing Members

DocumentFormat.OpenXml.Wordprocessing Namespace