Beach Access Software
bchacc at san.rr.com
Wed Jan 17 22:41:25 CST 2007
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. 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 Beach Access Software Sent: Wednesday, January 17, 2007 2:00 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Closing Word Dear List: I am using the following code to open a word doc the path and file name of which are in the bound field fldFabWorkInstrucitons. Private Sub fldFABWorkInstructions_DblClick(Cancel As Integer) Dim objWord As Word.Application Dim objWordDoc As Word.Document Set objWord = CreateObject("Word.Application") With objWord 'Visible is set True in order to view the operation. .Visible = True .Documents.Open (Me.fldFABWorkInstructions) End With End Sub If works fine, but I'd like to terminate the process when the user is finished looking at the document. How can I know when this happens? The user might, while the doc is open, leave the form where it was opened. MTIA Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com -- 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.16.13/632 - Release Date: 1/16/2007 4:36 PM