Please help with importing text

A

Al

I want to import text from MS Word. All the files that I
need are in one folder. Instead of importing one file at a
time(there are big number of files), I would like to have
a routin that would loop through the folder and import all
the files. All the files are formated the same way for
that purpose.Any ideas? any Help will be greatly
appreciated.
thanks
Al
 
T

Ted

We had quite a few posts regarding this issue starting on
Jan 26 under a few topics by Jason and Toby. To get you
started, I think the best starting point would be the
sample VB code outline posted by John Nurick as a
response to one of those, which was the following (you
may want to look up help on the Dir() function, which is
really the key to the code):

strFN = Dir("C:\Folder\*.txt")
Do While Len(strFN) > 0
'import this file to Access table
DoCmd.TransferText blah blah blah
'rename this file so we don't use it again by
accident
Name strFN As strFN & ".done"
'get next filename
strFN = Dir()
Loop

-Ted
 
G

GRayL

Al: Are the imported files to go to one Access table or a
different table for each Word file? In the simplest case,
each Word file goes into a memo field of the same table.
Are you sure you want to import or would you be satisfied
with an OLE link to your Word file from say the memo
field of the Access table? There are several ways to go
about resolving this but you need to define the problem
better.

GRayL
 
A

Al

they are all going into one table. The client is trying
to move from different software (professional write, MS
Word...) to Access. However, your idea of linking to word
is interesting. could you give me some details:) thank you
Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top