[AccessD] Getting a handle to hidden word instance

Max Wanadoo max.wanadoo at gmail.com
Sun Jan 27 04:18:59 CST 2008


John,
Are you using something like this.

Private objWord As Word.Application ' or dim if in procedure

Set objWord = New Word.Application ' create your own application of word

Your code here 

Set objWord = Nothing  ' release the word object


Max

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Friday, January 25, 2008 10:39 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Getting a handle to hidden word instance

I am using a mail merge system that occasionally leaves Word open but
hidden.  The next time the mail merge tries to run it can't since word is
open and holding a file open that the mail merge function is trying to
create.  Thus I need to get a handle on any open word instance, and
hopefully see if it is hidden.  If so assume it is mine and close it.  Is
there any way to do such a thing in VBA code?

Thanks,

John W. Colby
Colby Consulting
www.ColbyConsulting.com 

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list