Handling the "do you want to save the document"

usually we get the document handling in the events…but i need to get the handle to "do you want to save the document"prompt msg, there i need the handle yes-no-cancel