Running Word from Access

J

Joop

Hi All,

In an applicatian I run Word from Access. Most of the times everything works
well, but sometimes The document that I open in Word from Access does not
appear on the screen. When this situation occurs a instance of Word is
running without being visible on the screen. When I kill this instance is in
the process-list (ctrl-alt-del) everything works well again.

Does anybody know a way to detect this situation from VBA and clean the
process?

regards, Joop
 
M

MacDermott

You can use GetObject() to establish a reference to the exisiting instance
(this will fail with a trappable error if no instance exists). You can then
perform a .Quit on that instance, and set your reference to Nothing.

HTH
- Turtle
 
Top