I am a newbie to VBA and need to know if I can have a macro launch from an event. Specifically when a user gets ready to close a document can I somehow automatically have a macro run against that doc before it closes?
There is a Document_Close event. Look in the VBA Project Explorer and select the ThisDocument Object. The Code window for the Document will be displayed. Select Dooument from the Object dropdown and Close from the Procedure dropdown.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.