Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Sat Apr 7 13:30:13 CDT 2007
Aha. Quit. Thank you. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of MartyConnelly Sent: Saturday, April 07, 2007 10:20 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Automation Problem - Closing Word Add this line objWord.Documents.Close objWord.Quit Set objWord = Nothing Rocky Smolin at Beach Access Software wrote: >Dear List: > >I am getting the text of a document into a string variable from a word doc. >Then I want to close word. I get the text of the document OK (which >then goes into an email). > >But with the code below, the document closes but Word says open. How can >I get WORD closed up? > > Dim objWord As Object > > ' Get the body text > Set objWord = CreateObject("Word.Application") > objWord.Documents.Open (argDocument) > objWord.Selection.WholeStory > strBody = objWord.Selection > 'MsgBox strBody > objWord.Documents.Close > Set objWord = Nothing > > >MTIA > >Rocky > > > > > > > -- Marty Connelly Victoria, B.C. Canada -- 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.446 / Virus Database: 268.18.26/750 - Release Date: 4/6/2007 9:30 PM