Beach Access Software
bchacc at san.rr.com
Sat Jan 20 09:45:20 CST 2007
Bryan: I agree with you. But Access disagrees with us. Here's the code: Private Sub cmdDisplayWordDoc_Click() Dim objWord As Word.Application Dim objWordDoc As Word.Document Set objWord = New Word.Application With objWord 'Visible is set True in order to view the operation. .Visible = True .Documents.Open (Me.fldFABWorkInstructions) End With Set objWord = Nothing End Sub I run it with the task manager open to processes and as it goes through the code WINWORD opens up and the document is displayed. I put a breakpoint at End Sub just to satisfy myself that the code passed through the Set objWord = Nothing. WINWORD disappears from the task managers' processes screen but the document is still open. Go figure... Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bryan Carbonnell Sent: Saturday, January 20, 2007 6:56 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Closing Word On 1/17/07, Beach Access Software <bchacc at san.rr.com> wrote: > Never mind. I think. Adding Set objWord = Nothing at the end of the > routine seems to work. It leaves the document open and there's no WINWORD > left in the task manager's processes. Sorry, just catching up, but.... No Winword in Task manager, but the Word doc is still open? Impossible. (now that I say that someone is going to prove me wrong) Winword is Word. Without it, being present you won't have the document open. can you elaborate a bit more? I'm curious. -- Bryan Carbonnell - carbonnb at gmail.com Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "What a great ride!" -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.1/640 - Release Date: 1/19/2007 4:46 PM