-2

I use ooxml.doc.Text, and need to know that text is in a center, left, or in right. In Text i have only these functions/values: 'parent', 'ppr', 'reset', 'rpr', 'text', 'value', in this class not have aligment variable. How I can get that?

1 Answers1

0

Do you need to go directly into the xml for that?

d = Document()
alignment = d.paragraphs[0].paragraph_format.alignment
print(alignment)

Otherwise, I don't think, that you'll find that information in .Text I think. I might be wrong, but I think, that you define the alignment on the paragraph-level.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Alex
  • 23
  • 5