scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.26k stars 499 forks source link

thanks @scanny! I used the following to move a picture I added using add_picture to the background: #900

Closed Dishank28-2 closed 8 months ago

Dishank28-2 commented 12 months ago
          thanks @scanny! I used the following to move a picture I added using add_picture to the background:

should it be shpes[0] or slide.shapes[0]

cursor_sp = shapes[0]._element
cursor_sp.addprevious(pic._element)

MS Powerpoint opens the file without complaining

Originally posted by @chrismcmc in https://github.com/scanny/python-pptx/issues/49#issuecomment-320464051