Reputation: 80
I am currently using an activeX-server object (named PP in the code) to write a powerpoint presentation (pres) from MATLAB. At the end, I close the presentation. This causes powerpoint to close the presentation, what a surprise, but leaves a powerpoint window open. If I close the PP object, all powerpoints currently open, not only those I wrote, are closed. The problem is that all powerpoint windows share one process and PP.Quit() kills that process. Is there any way to close one specific powerpoint window without killing the powerpoint process?
PP = actxserver('PowerPoint.Application');
do stuff
pres = PP.Presentations.Open(fileName);
pres.Close(); %<- Closes the presentation, but an empty powerpoint window is still open.
PP.Quit(); % <- That is the problem
Upvotes: 0
Views: 904
Reputation: 13
You can try this:
PP.Quit;
PP.delete;
instead of:
pres.Close(); %<- Closes the presentation, but an empty powerpoint window is still open.
PP.Quit(); % <- That is the problem
Upvotes: 1