Spacing class

Office 2013 and later

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

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

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:rPr>
  <w:spacing w:val="200"/>
</w:rPr>

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 (§17.3.1.29); rPr (§17.3.1.30); rPr (§17.5.2.28); rPr (§17.9.25); rPr (§17.7.9.1); rPr (§17.7.5.4); rPr (§17.3.2.28); rPr (§17.5.2.27); rPr (§17.7.6.2); rPr (§17.3.2.27)

Attributes

Description

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 = ). 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.

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