BaselineAlignment enumeration

BaselineAlignment enumeration

Specifies fonts vertical position on a line.

Members

NameDescription
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.

Examples

Shows how to set fonts vertical position on a line.

doc = aw.Document(file_name=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
doc.save(file_name=ARTIFACTS_DIR + 'ParagraphFormat.ParagraphBaselineAlignment.docx')

See Also