Have you tried intercepting MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE, MSG_GEN_DOCUMENT_ATTACH_UI_TO_DOCUMENT, and MSG_GEN_DOCUMENT_DETACH_UI_FROM_DOCUMENT? I would intercept those messages before the physical open and close.
Nathan