mutiple document interface and events

Would there happen to be some code lying around that shows how to attach events to ALL loaded documents?

Also to remove said events when documents are unloaded, attach to new documents, etc.

sounds like a job for HASHTABLE.

preferably in C#, but VB could be converted.

thanks

SolidworksApi macros