We use a DocumentOpen event procedure to carry out a set
of checks/actions whenever a document is opened.
This works fine, as a rule.
But if in a Word session any other procedure is stopped
for whatever reason (this seems to be one of the reasons
we 'lose' it but there may be others), after that the
event procedure does not kick in until Word is restarted,
unless the application object is re-initialised. But no
error/message is displayed to hint that anything gone
wrong.
Can duplicate the 'error' by stepping through and
stopping any procedure. After doing so the event
procedure doesn't run.
Is there a way to stop this happening, or to
automatically re-initialise the application object if it
does?
Any help appreciated.

Caroline

Re: DocumentOpen event does not run by Word

Word
Mon Nov 10 01:04:54 CST 2003

G'day "Caroline Miller" <anonymous@discussions.microsoft.com>,

handle all errors or remove erroneous code to a sep template.


"Caroline Miller" <anonymous@discussions.microsoft.com> was spinning
this yarn:

>We use a DocumentOpen event procedure to carry out a set
>of checks/actions whenever a document is opened.
>This works fine, as a rule.
>But if in a Word session any other procedure is stopped
>for whatever reason (this seems to be one of the reasons
>we 'lose' it but there may be others), after that the
>event procedure does not kick in until Word is restarted,
>unless the application object is re-initialised. But no
>error/message is displayed to hint that anything gone
>wrong.
>Can duplicate the 'error' by stepping through and
>stopping any procedure. After doing so the event
>procedure doesn't run.
>Is there a way to stop this happening, or to
>automatically re-initialise the application object if it
>does?
>Any help appreciated.
>
>Caroline

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

Replies offlist may require payment.