Page 1 of 1

Check if file is open before saving to rtf

Posted: Tue Aug 26, 2008 5:34 pm
by Nate
I have a program that saves the contents of Richview to an rtf file. If the intended path is a file that is already open, the program crashes. How can I check for this so that I can provide a message to the user to close the file, so that they never get to the point of crashing?

Thanks!

Posted: Wed Aug 27, 2008 5:27 am
by Sergey Tkachenko
If the file is already used and cannot be opened for saving, SaveRTF just returns False. No crashes must happen.