Home › Forums › General XMetaL Discussion › How to cancel save when custom validation detects an error › Reply To: How to cancel save when custom validation detects an error
Reply to: How to cancel save when custom validation detects an error
December 15, 2010 at 10:43 pmYou will need to use a special File menu override event called “File_Save”.
If you create this event and do not explicity call ActiveDocument.Save() then the document will not save (basically the reverse logic of what you are looking for). So you'd have a branching logic in your macro that checks for ActiveDocument.IsValid before saving and if that fails then it does not save.
See the Programmer's Guide topic called “File operations”.