section
section
¶
Enumerations related to the main document in WordprocessingML files.
WD_HEADER_FOOTER_INDEX
¶
Bases: BaseXmlEnum
Alias: WD_HEADER_FOOTER
Specifies one of the three possible header/footer definitions for a section.
For internal use only; not part of the python-docx API.
MS API name: WdHeaderFooterIndex
URL: https://docs.microsoft.com/en-us/office/vba/api/word.wdheaderfooterindex
WD_ORIENTATION
¶
Bases: BaseXmlEnum
Alias: WD_ORIENT
Specifies the page layout orientation.
Example:
from docx.enum.section import WD_ORIENT
section = document.sections[-1] section.orientation = WD_ORIENT.LANDSCAPE
MS API name: WdOrientation
MS API URL: http://msdn.microsoft.com/en-us/library/office/ff837902.aspx
WD_SECTION_START
¶
Bases: BaseXmlEnum
Alias: WD_SECTION
Specifies the start type of a section break.
Example:
from docx.enum.section import WD_SECTION
section = document.sections[0] section.start_type = WD_SECTION.NEW_PAGE
MS API name: WdSectionStart
MS API URL: http://msdn.microsoft.com/en-us/library/office/ff840975.aspx
CONTINUOUS
class-attribute
instance-attribute
¶
Continuous section break.
NEW_COLUMN
class-attribute
instance-attribute
¶
New column section break.
NEW_PAGE
class-attribute
instance-attribute
¶
New page section break.
EVEN_PAGE
class-attribute
instance-attribute
¶
Even pages section break.
ODD_PAGE
class-attribute
instance-attribute
¶
Section begins on next odd page.