0

I have a code which opens the print preview of an Excel file (over Interops Services). I use this to give the user a preview without manipulating the content. But when the print preview dialog gets closed, the file itself stays open. Is it possible to close the file or kill the process after the Dialog gets closed by the user (or a better way)?

1 Answers1

0

To close the open file, call Close() on the Workbook object and call Quit() on the Excel.Application object.

Nemo
  • 3,285
  • 1
  • 28
  • 22
  • What would be the event for this? So when the dialig gets closed by the user? –  Nov 01 '15 at 11:05