B
BeWyched
I have an Access application that need to close any non-visible instances of
Word running in the background. This is to tidy up any Word objects that have
been left behind. Any visible instances of Word must be left open. In
essence, the VBA equivalent of 'End Process' on Winword instances in Windows
Task Manager.
I can close all instances using GetObject to grab Word then quit but this
also quits visible instances. My coding for this is:
On Error GoTo Word_Is_Closed
Word_Close:
Set oWord = GetObject(, "Word.Application")
oWord.Activate
oWord.Quit
Set oWord = Nothing
GoTo Word_Close
Word_Is_Closed:
Anyone any ideas?
Thanks.
BW
Word running in the background. This is to tidy up any Word objects that have
been left behind. Any visible instances of Word must be left open. In
essence, the VBA equivalent of 'End Process' on Winword instances in Windows
Task Manager.
I can close all instances using GetObject to grab Word then quit but this
also quits visible instances. My coding for this is:
On Error GoTo Word_Is_Closed
Word_Close:
Set oWord = GetObject(, "Word.Application")
oWord.Activate
oWord.Quit
Set oWord = Nothing
GoTo Word_Close
Word_Is_Closed:
Anyone any ideas?
Thanks.
BW