テキストを上に設定するにはどうすればよいですか (標準の本文の最初の行が前もって設定されています)、上揃えに設定されていませんか?
Add_paragraph 関数は最初の箇条書きレベル (レベル = 0) を有効にしませんでしたか?
誰かがこの問題を解決する方法についてアイデアを得ましたか? (左側の問題と右側の目標を理解するために写真を見てください)
# Shape position
left = Inches(0.4)
top = Inches(1.5)
width = Inches(4.5)
height = Inches(1.6)
box = shape.add_shape(MSO_SHAPE.RECTANGLE, left, top, width, height)
text_frame = box.text_frame
text_frame.clear() # not necessary for newly-created shape
#Fill
fill = box.fill
line = box.line
fill.solid()
fill.fore_color.theme_color = MSO_THEME_COLOR.ACCENT_6
line.color.theme_color = MSO_THEME_COLOR.ACCENT_6
p = text_frame.add_paragraph()
run = p.add_run()
# bullet ?
#p.level = 0
# Top position?
p.vertical_anchor = MSO_ANCHOR.TOP
p.alignment = PP_ALIGN.LEFT
p.margin_left = Inches(0.02)
p.margin_top = Inches(0.00)
#p.margin_bottom = Inches(0.08)
run.text = "..."
# Fonts
font = run.font
font.name = 'Arial (Body)'
font.size = Pt(8)
font.bold = False
font.italic = None # cause value to be inherited from theme
font.color.theme_color = MSO_THEME_COLOR.ACCENT_1