Hale, Jim
Jim.Hale at FleetPride.com
Mon Apr 18 10:53:35 CDT 2005
Whatever it takes to get the job done! Sorry I couldn't be more help. Jim Hale -----Original Message----- From: Bob Heygood [mailto:bheygood at abestsystems.com] Sent: Monday, April 18, 2005 10:09 AM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Scrape Word Thanks Jim I finally just ran the job as it took about 4 hours to process 256 documents. it is a one time deal and the customer needed to have the results. your help was fantastic. bob -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Hale, Jim Sent: Friday, April 15, 2005 3:18 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Scrape Word I'll look at it some more on Monday. You might examine the selection object in the Word application. It has numerous properties and methods one or more of which should do the trick. Jim Hale -----Original Message----- From: Bob Heygood [mailto:bheygood at abestsystems.com] Sent: Friday, April 15, 2005 4:52 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] Scrape Word yes in a table cell. again your code is working super. but only grabs the first word, sometimes there is more than one word in the cell, and I would like to capture all of them. if you have thought, I would welcome it. again I tried to manipulate the code further but it acts very erratic when in a table cell. thanks for the great help. bob -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Hale, Jim Sent: Thursday, April 14, 2005 12:53 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Scrape Word So the data you want (including the search string) is in a table cell? In the code I sent you delete wd.Selection.Start = wd.Selection.End Call wd.Selection.EndOf(wdSentence, wdExtend) and replace with wd.Selection.Next(Unit:=wdWord, Count:=1).Select Or if the entire string is returned you can replace the search string with an empty string "" using the following function: Function ReplaceString(strTextIn As String, strFind As String, strReplace As String, fCaseSensitive As Boolean) As String Dim strTmp As String Dim intPos As Integer Dim intCaseSensitive As Integer intCaseSensitive = IIf(fCaseSensitive, 2, 1) strTmp = strTextIn intPos = InStr(1, strTmp, strFind, intCaseSensitive) Do While intPos > 0 strTmp = Left$(strTmp, intPos - 1) & strReplace & Mid$(strTmp, intPos + Len(strFind)) intPos = InStr(intPos + Len(strReplace), strTmp, strFind, intCaseSensitive) Loop ReplaceString = strTmp End Function Jim Hale *********************************************************************** The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. No liability is accepted for any damages caused by any virus transmitted by this email. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com *********************************************************************** The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. No liability is accepted for any damages caused by any virus transmitted by this email.