Borders for each page of a section are defined with the <w:pgBorders> element. Child elements of this element specify the kinds of border--left, right, bottom, and top.
Specifies on which pages to display the border. Possible values are:
Specifies how the relative positioning of the borders should be calculated. Possible values are:
Specifies whether the page border is positioned above or below intersecting text and objects. Possible values are:
|top||Specifies the border for the top of the page for each page in the section.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.6.21.
|bottom||Specifies the border for the bottom of the page for each page in the section.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.6.2.
|left||Specifies the border for the left side of the page for each page in the section.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.6.7.
|right||Specifies the border for the right side of the page for each page in the section.
Reference: ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.6.15.
Attributes of child elements:
The most commonly used attributes are below (theme-related attributes are omitted):
|color||Specifies the color of the border. Values are given as hex values (in RRGGBB format). No #, unlike hex values in HTML/CSS. E.g., color="FFFF00". A value of auto is also permitted and will allow the consuming word processor to determine the color.|
Used to define a customer border image. It specifies the relationship ID for the relationship that contains the border image. The image is contained within a separate part of the package. E.g., <w:bottom w:val="custom" r:id="rIdCustomBottomBorder" . . ./>. The relationship with ID of rIdCustomBottomBorder must contain the image. Note that the relationship targeted by the attribute must be of type http://purl.oclc.org/ooxml/officeDocument/relationships/image or the document will be non-conformant.
Note: Earlier versions of the standard did not support this attribute.
|shadow||Specifies whether the border should be modified to create the appearance of a shadow. For right and bottom borders, this is done by duplicating the border below and right of the normal location. For the right and top borders, this is done by moving the border down and to the right of the original location. Permitted values are true and false.|
|space||Specifies the spacing offset. Values are specified in points (1/72nd of an inch).|
|sz||Specifies the width of the border. If the border is a line border, the size is specified in eights of a point, with a minimum value of two (1/4 of a point) and a maximum value of 96 (twelve points). If the border is an art border, the width is given in points and a minimum of 1 and a maximum of 31.|
Specifies the style of the border. Page borders can be line borders or art borders. Possible line border values are:
For the possible art borders, see the specification at ECMA-376, 3rd Edition (June, 2011), Fundamentals and Markup Language Reference § 17.18.2.