PageBorderAppliesTo enumeration

PageBorderAppliesTo enumeration

Specifies which pages the page border is printed on.


ALL_PAGESPage border is shown on all pages of the section.
FIRST_PAGEPage border is shown on the first page of the section only.
OTHER_PAGESPage border is shown on all pages except the first page of the section.


Shows how to create a wide blue band border at the top of the first page.

doc = aw.Document()

page_setup = doc.sections[0].page_setup
page_setup.border_always_in_front = False
page_setup.border_distance_from = aw.PageBorderDistanceFrom.PAGE_EDGE
page_setup.border_applies_to = aw.PageBorderAppliesTo.FIRST_PAGE

border =
border.line_style = aw.LineStyle.SINGLE
border.line_width = 30
border.color =
border.distance_from_text = 0 + "PageSetup.page_border_properties.docx")

See Also