What I am trying to do is to get a section of code to run whenever a specific
document (not a template) is opened (using Word 2003 with WinXP SP2). I have
put the following test event handling code in the 'ThisDocument' object of
the word document's project:
Private Sub Document_Open()
MsgBox "Opening document"
End Sub
However, when I close the document and open it up again, the code doesn't
appear to execute i.e. the message box doesn't display. Does this event
handling work with documents that aren't templates? Is there something I'm
missing?
Thanks in advance for your help
Jonathan West - 15 Mar 2006 12:34 GMT
> What I am trying to do is to get a section of code to run whenever a
> specific
[quoted text clipped - 13 lines]
>
> Thanks in advance for your help
Which version of Word are you running?
What are your security settings? (go to Tools, Macro, Security) to find out.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org