Programmatically shutting down Windows Notepad
Posted on 1998-10-04
My application creates a report file for the user to view in
Windows Notepad, by simply clicking on a speedbutton. However, sometimes some users forget to close down this file and run my program again - which will attempt to re-create this report file. When this happens, they of course get an I/O error window because this report file is already open in Windows Notepad.
is there a way I can automatically close this file (..if it happens to be open) whenever the user re-runs my program? It would save them from crashing the program.