-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Labels
Description
I'm writing a WPF application.
If I run this code, a process is created but then cleared up:
// Assigns to a field
application = new NetOffice.PowerPointApi.Application();
// Now POWERPNT.exe process is running
// Then later...
application.Quit();
application.Dispose();
// POWERPNT.exe process is goneWhereas if I actually start a presentation, the process stays alive:
// Assigns to a field
application = new NetOffice.PowerPointApi.Application();
// Now POWERPNT.exe process is running
// Start the presentation, assigning to fields
presentation = application.Presentations.Open(@"path\to\slides.pptx", readOnly: MsoTriState.msoTrue, untitled: null, withWindow: MsoTriState.msoFalse);
var settings = presentation.SlideShowSettings;
settings.ShowPresenterView = MsoTriState.msoFalse;
slideShowWindow = settings.Run();
// Later
slideShowWindow.Dispose();
presentation.Close();
presentation.Dispose();
// Later still
application.Quit();
application.Dispose();
// POWERPNT.exe is still runningPowerPoint keeps running even after my WPF app has finished. Is there some way of really closing it, hard? (I can use Process.Kill, but I'd prefer something a little more controlled...)