Yes, there is code for this and it came in with Word 2000.
Let me dig out some code as this is something which I always fail to do
off the top of my head...
Okay, in Word 2000 and upwards create a CLASS module in one of your
start-up templates.
In this example call it 'clsApp'.
Put in the following code:
Option Explicit
Public WithEvents App As Word.Application
Private Sub App_DocumentOpen(ByVal Doc As Document)
msgbox "Hello, Hello, Hello. What's going on here then? Someone's
opened up a new document"
End Sub
Actually, just making the Public WithEvents declaration will allow you to
see 'App' in the left hand drop down control. In other words, you have
created your own event handling object.
Looking through the list of other available events to trap one can see a
list of rather useful and groovy events, such as DocumentChange which is
triggered when the user selects another document.
Anyway, have fun with this event and remember to create it in a class in a
start-up template. If you wish to take my advice; please don't put it
into Normal.dot (I won't mention why here as the flames from the last
religous wars haven't yet died down).
Hope this helps, if not then get back straight away to me.
Regards
Malc
www.dragondrop.com
Anyway, just drop