BaselineAlignment enumeration

BaselineAlignment enumeration

Specifies fonts vertical position on a line.


TOPAligns along the top of each font.
CENTERAligns the center points of each font.
BASELINEAligns to the baseline of the paragraph.
BOTTOMAligns to the bottom of each font.
AUTOBaseline is adjusted automatically.


Shows how to set fonts vertical position on a line.

doc = aw.Document(MY_DIR + "Office math.docx")

format_ = doc.first_section.body.paragraphs[0].paragraph_format

if format_.baseline_alignment == aw.BaselineAlignment.AUTO:
    format_.baseline_alignment = aw.BaselineAlignment.TOP + "ParagraphFormat.ParagraphBaselineAlignment.docx")

See Also