VerticalAlignment enumeration

VerticalAlignment enumeration

Specifies vertical alignment of a floating shape, text frame or a floating table.

Members

NameDescription
NONEThe object is explicitly positioned, usually using its Top property.
TOPSpecifies that the object shall be at the top of the vertical alignment base.
CENTERSpecifies that the object shall be centered with respect to the vertical alignment base.
BOTTOMSpecifies that the object shall be at the bottom of the vertical alignment base.
INSIDESpecifies that the object shall be inside of the horizontal alignment base.
OUTSIDESpecifies that the object shall be outside of the vertical alignment base.
INLINENot documented. Seems to be a possible value for floating paragraphs and tables.
DEFAULTSame as VerticalAlignment.NONE.

Examples

Shows how to insert a floating image to the center of a page.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)

# Insert a floating image that will appear behind the overlapping text and align it to the page's center.
shape = builder.insert_image(IMAGE_DIR + "Logo.jpg")
shape.wrap_type = aw.drawing.WrapType.NONE
shape.behind_text = True
shape.relative_horizontal_position = aw.drawing.RelativeHorizontalPosition.PAGE
shape.relative_vertical_position = aw.drawing.RelativeVerticalPosition.PAGE
shape.horizontal_alignment = aw.drawing.HorizontalAlignment.CENTER
shape.vertical_alignment = aw.drawing.VerticalAlignment.CENTER

doc.save(ARTIFACTS_DIR + "Image.create_floating_page_center.docx")

See Also