Is there a way to run a macro when closing a drawing file?

The aim is to perform a validation of information between a solid vs. drawing, the important thing is to detect if the user manipulated information. I clarify that I do not seek a validation method, I just want to know if it is possible to run a macro when closing a drawing file.

SolidworksApi macros