Center-align text with Python-pptx
<p><strong>Question in short:</strong> Is it possible to align text to the center in Python-pptx?</p>

<p>Since I'm using Python-pptx, I have been able to automate quite a lot of things and I really enjoy using it! However, I've run into a problem. I'm trying to center my text horizontally on a slide. If you don't understand me:</p>

<p><a href="https://i.stack.imgur.com/R3JB0.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/R3JB0.jpg" alt="See how the first two paragraphs differ from the other two?"></a></p>

<p>My text is now aligned to the left, similar to the text in the first two paragraphs. However, I'd like them to be aligned to the center, like those last two paragraphs. This is a snippet of my code:</p>

<pre><code>left = Cm(3)
top = Cm(2.5)
width = Cm(15)
height = Cm(1)
txBox = slide.shapes.add_textbox(left, top, width, height)
tf = txBox.text_frame
p = tf.add_paragraph()
run = p.add_run()
run.text = "Just an example"
font = run.font
font.size = Pt(30)
</code></pre>

<p>I looked in the documentation, but couldn't find anything useful. I read something about "MSO_VERTICAL_ANCHOR" and "PP_PARAGRAPH_ALIGNMENT", but I just can't get it working.</p>

<p>Thank you in advance!</p>