title: Use python to find text in PowerPoint and replace with image?
body: <p>Right now I have to add various images/icons next to names in PowerPoint corresponding to the sector in which they work. I found <a href="https://stackoverflow.com/questions/37924808/python-pptx-power-point-find-and-replace-text-ctrl-h">code</a> to find and replace text, but I want to find text (e.g. "Health", "Water", etc.) throughout the powerpoint and replace with the corresponding image. Is there a direct way to do this? The code below replaces 'Health' with the ReplaceList string:</p>
  
  <pre><code>from pptx import Presentation    
  ppt = Presentation('Powerpoint.pptx')    
  TextList = 'Health'
  ReplaceList = r'C:\Users\E\Desktop\Icons\Health.png'
  
  for slide in ppt.slides:
      for shape in slide.shapes:
          if shape.has_text_frame:
              shape.text = shape.text.replace(TextList,ReplaceList)
  
  ppt.save('New_Powerpoint.pptx')
  </code></pre>
  
  <p>If not, is there a way to locate the text locations (left, top) to then insert the image using the code below? </p>
  
  <pre><code>pic = slide.shapes.add_picture(image, left, top)
  </code></pre>