Powerpoint file can be deleted without consequence

Posted by John Maloney on Stack Overflow See other posts from Stack Overflow or by John Maloney
Published on 2010-03-27T22:01:03Z Indexed on 2010/03/27 22:03 UTC
Read the original article Hit count: 266

I am working on a license management type application that copies a password protected zip file to the applications root. The user clicks a button "Open Presentation" and the zipped file is extracted into the root folder and then I use the Office interop to open the file in Powerpoint. At this point to my surprise I am able to delete the extracted file that is currently open in the Powerpoint application. I had assumed that trying to delete the file would fail as the file is still open in Powerpoint.

Why is it allowing me to delete the file? Is the file somehow copied to a temp folder and then opened in PowerPoint?

Can I move forward with the application relying on this ability to delete the file as soon as it is opened in Powerpoint? This would be optimal because it helps insure that the file cannot be copied(I am also using the xml to stop "Save As" and "Save" from appearing int Powerpoint).

Thanks for the insight, John

© Stack Overflow or respective owner

Related posts about office-interop

Related posts about deleting