William Hindman
wdhindman at dejpolsystems.com
Wed Feb 25 17:26:37 CST 2009
...sweet it is! ...this has been one heck of a week on AccessD for my code library :) William -------------------------------------------------- From: "Rocky Smolin at Beach Access Software" <rockysmolin at bchacc.com> Sent: Wednesday, February 25, 2009 6:11 PM To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Subject: Re: [AccessD] Word Not Closing > Well, here's something I found on the web that seems to work: > > Private Declare Function OpenClipboard Lib "user32" (ByVal hWnd As Long) > As > Long > Private Declare Function CloseClipboard Lib "user32" () As Long > Private Declare Function EmptyClipboard Lib "user32" () As Long > > Then where you want to empty the clipboard: > > Call OpenClipboard(0&) > EmptyClipboard > CloseClipboard > > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.e-z-mrp.com > www.bchacc.com > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman > Sent: Wednesday, February 25, 2009 2:42 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Word Not Closing > > ...I never found a way within Access vba to address the Windows Clipboard > > ...but you can avoid the clipboard dialog by setting its contents to "" > before you quit word. > ...how to do that is up to you ...ain't exactly an easy thing unless > someone > else has found a switch. > ...you can try using: > > Dim MyData As DataObject > Set MyData = New DataObject > MyData.SetText "" > MyData.PutInClipboard > > ...that should require setting a ref to the win forms 2 object ...or the > Win > Scripting Host with vbscript should work as well > > ...be sweet if you found a better answer > > > William > > -------------------------------------------------- > From: "Rocky Smolin at Beach Access Software" <rockysmolin at bchacc.com> > Sent: Wednesday, February 25, 2009 5:08 PM > To: "'Access Developers discussion and problem solving'" > <accessd at databaseadvisors.com> > Subject: Re: [AccessD] Word Not Closing > >> Charlotte: >> >> That did it!! Although I spelled it Quit. :) >> >> However, since I'm copying out all the text of the document, when it >> closes a message pops up about having copied a bunch of stuff to the >> clipboard - do I want it keep it there for later use Y/N? >> >> Do you know if there's a way to suppress that message on the way out? >> Is there a property to empty the clipboard? >> >> TIA >> >> >> Rocky Smolin >> Beach Access Software >> 858-259-4334 >> www.e-z-mrp.com >> www.bchacc.com >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte >> Foust >> Sent: Wednesday, February 25, 2009 12:56 PM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] Word Not Closing >> >> I'm working off memory, so don't rely on it. Try objWord.Quite. >> >> Charlotte Foust >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky >> Smolin at Beach Access Software >> Sent: Wednesday, February 25, 2009 11:39 AM >> To: 'Access Developers discussion and problem solving' >> Subject: Re: [AccessD] Word Not Closing >> >> Charlotte: >> >> objWord.close generates error Object does not support this property or >> method. Is it because of late binding? >> >> >> Rocky Smolin >> Beach Access Software >> 858-259-4334 >> www.e-z-mrp.com >> www.bchacc.com >> >> >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte >> Foust >> Sent: Wednesday, February 25, 2009 11:06 AM >> To: Access Developers discussion and problem solving >> Subject: Re: [AccessD] Word Not Closing >> >> You aren't closing the word.application, you're just setting the >> variable to nothing once you close the document. Isn't there an >> objWord.Close missing? >> >> Charlotte Foust >> >> -----Original Message----- >> From: accessd-bounces at databaseadvisors.com >> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky >> Smolin at Beach Access Software >> Sent: Wednesday, February 25, 2009 11:02 AM >> To: 'Access Developers discussion and problem solving' >> Subject: [AccessD] Word Not Closing >> >> Dear List: >> >> >> >> I am using the following to get the contents of a word doc. Works all >> OK except that Word is not closing. Document is closed but not word. >> What am I doing wrong? >> >> >> >> ' Get word document >> Dim objWord As Object >> Set objWord = CreateObject("Word.Application") objWord.Documents.Open >> (varFileName) objWord.Visible = False objWord.Selection.Wholestory >> objWord.Selection.Copy strBody = objWord.Selection >> objWord.Documents.Close Set objWord = Nothing >> >> >> >> >> MTIA, >> >> >> >> Rocky Smolin >> >> Beach Access Software >> >> 858-259-4334 >> >> www.e-z-mrp.com <http://www.e-z-mrp.com/> >> >> www.bchacc.com <http://www.bchacc.com/> >> >> >> >> >> >> >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> >> -- >> AccessD mailing list >> AccessD at databaseadvisors.com >> http://databaseadvisors.com/mailman/listinfo/accessd >> Website: http://www.databaseadvisors.com >> > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >