Run a VBA macro on Close

Can anybody help???

Is it possible to automatically run a SolidWorks VBA macro every time I close a document (Assembly, Part or Drawing)?

Could it be done with a Vb.net Addin?

Many thanks in advance!!!!

Darren

SolidworksApi macros