Import text with certain word

Ammarhm

Beginner User
Local time
Today, 10:41
Joined
Jul 3, 2008
Messages
80
Hi
I need to write a VBA for searching through the content of an external word file then import the sentence containing a certain word to a table in access
Any idea please?
Best regards
 
Scripting in Word makes Access look like a walk in the park. I would have to write the whole thng myself to explain every piece but here is a pointer in the right direction.

You need to use the Find Method to locate the word then the MoveStart Method and
MoveEnd Method of the Selection object to select the sentence.

Then assign the selection to a variable and add it to the table using a query or via a recordset.
 
One way to get the right code to search in Word is to record a macro in Word, while doing the search, and then edit the ensuing code as needed.

You have not reacted to my suggestion in one of you other posts to search for an application that can extract data from multiple word-files without any coding. Coding is a fun but time-consuming hobby :D
 
One way to get the right code to search in Word is to record a macro in Word, while doing the search, and then edit the ensuing code as needed.

That is what I do too. It doesn't go the whole way but it is uaually a good start.
 

Users who are viewing this thread

Back
Top Bottom