Why Doesn't the Document_Close Event Handler Run?

Discover under what conditions the Document_Close event handler won't fire.

Sue Mosher

November 27, 2005

1 Min Read
ITPro Today logo

A Word document saved directly in a public folder or attached to a post in a folder doesn't run its Document_Close procedure when the save occurs. How can I make that macro work?

Technically, Document_Close is an event handler, not a macro. A macro is a Public Sub procedure in Visual Basic for Applications (VBA) and has no arguments. In your scenario, there's a big difference between the two. As long as the security settings in Microsoft Word (Tools, Macro, Security) are set to allow macros to run, true macros will work just fine. You can invoke them with the Alt+F8 command or add them to the toolbar. But as far as I can tell, event handlers don't fire in documents that are stored in Outlook or Exchange folders, probably as a security measure.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like