DocumentOpen event does not run

  • Thread starter Caroline Miller
  • Start date
C

Caroline Miller

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
 
W

Word Heretic

G'day "Caroline Miller" <[email protected]>,

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


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top