I have some c# code which opens a Powerpoint slide, refreshes the graphs, and then quits.
This works fine, unless the user already has a Powerpoint slide open, in which
You could check how many other Presentations are open, and only quit if yours is the only one:
ppPres.SaveAs(outputFilename); var presentations = ppApp.Presentations; if (presentations.Count <= 1) { ppPres.Close(); ppApp.Quit(); }