Python pptx (Power Point) Find and replace text (ctrl + H)
<p><strong>Question in Short:</strong> How can I use the find and replace option (<kbd>Ctrl</kbd>+<kbd>H</kbd>) using the Python-pptx module?</p>

<p>Example Code:</p>

<pre><code>from pptx import Presentation

nameOfFile = "NewPowerPoint.pptx" #Replace this with: path name on your computer + name of the new file.

def open_PowerPoint_Presentation(oldFileName, newFileName):
    prs = Presentation(oldFileName)

    prs.save(newFileName)
open_PowerPoint_Presentation('Template.pptx', nameOfFile)
</code></pre>

<p>I have a Power Point document named "Template.pptx". With my Python program I am adding some slides and putting some pictures in them. Once all the pictures are put into the document it saves it as another power point presentation.</p>

<p>The problem is that this "Template.pptx" has all the old week numbers in it, Like "Week 20". I want to make Python find and replace all these word combinations to "Week 25" (for example).</p>