I have seen many answers out here and there that suggest to use the Copy()
and Paste()
methods for copying shapes between slides, presentations and applications:
- How can I copy shapes from one slide to another slide in c#?
- Powerpoint editing how to copy one shape from one slide to another
- Macro to import notes from PowerPoint into Word
These methods work fine but have side effects because they interact with the clipboard without user consent. When a program runs a series of copy-paste operations in background, it is impossible for a user to work with the clipboard.
I have been looking for a possibility to backup and restore the clipboard, but it looks like it is a wrong way (see these answers). Another reason for not using the clipboard for copying is that if a user copies something into clipboard just before we call Paste()
we will end up with a wrong result.
Is there a sane way?