python-pptx icon indicating copy to clipboard operation
python-pptx copied to clipboard

Open a PPT in append mode

Open rick2047 opened this issue 1 year ago • 5 comments

during development of visualizations I would like to have a tighter cycle of iteration. I would like the ability to add a slide to a ppt I have open so I can just look at the slide and do a new iteration rather than save a timestamped file each time. As far as I understand the documentation this isn't currently possible using this package. Is this something that would fit this project?

rick2047 avatar Oct 08 '24 07:10 rick2047

For timestamping your Python could probably save to a different file each time.

I myself have automated reload to be Ctrl+r in Powerpoint (on Mac). You probably could do the same - though you don't say what platform you're on.

MartinPacker avatar Oct 08 '24 08:10 MartinPacker

I wanted to avoid timestamping. The loop I'm used to from some tooling in MATLAB is open a test PPT and make a new slide to test how my slide looks like after my changes.

I am on windows 11. I am not aware of the Ctrl+r option you are talking about. Can you elaborate?

rick2047 avatar Oct 08 '24 09:10 rick2047

Shame timestamping doesn't work for you. But if not that then what is versioning?

Ctrl+R is some automation I built specifically for my Mac. It uses a nice Mac app called Keyboard Maestro.

The only point I would make is that maybe automation could take the pain out of reloading.

(In fact I have another automation - Ctrl+G - that goes from Markdown (via my mdpre and md2pptx tools driven by make) through to reloading a rebuilt presentation. I use it many times a day.)

I'm sorry I don't know Windows automation tools.

MartinPacker avatar Oct 08 '24 09:10 MartinPacker

Sorry maybe I am not able to articulate what I need. The loop I would like to have is have my ppt open, then using python add a new slide. Its not about versioning at all. Kind of like how pyppt package edits slides "on-the-fly".

rick2047 avatar Oct 10 '24 11:10 rick2047

You cannot append a slide from one presentation to another using python-pptx. You can't use python-pptx in active mode too.

Sounds like you need VBA or Officejs or Interlop Ironpython.

mszbot avatar Oct 15 '24 11:10 mszbot