?
Solved

Sql query for importing .doc files in a table

Posted on 2009-07-16
3
Medium Priority
?
183 Views
Last Modified: 2012-05-07
Hi!
I need a sql query or a VBA code (I work in Acess) to read all the .doc files from a folder, when I click a button. I have a folder (c:\docs) and in this folder I have .doc files. I also have a table ( table1) with filds ID, document (type: OLE Object). I want a sql query or a vba code to read all the documents name from the folder and then import all the document in the table.

Thank you!
0
Comment
Question by:Qw M
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Expert Comment

by:Surone1
ID: 24869249
On Error Resume Next

myfl = Dir("C:\docs\*.doc")

Do While myfl <> ""
docfile =  "C:\docs\" & myfl
<insert into database part>


myfl = Dir

Loop
0
 

Author Comment

by:Qw M
ID: 24869282
I also need the code <the insert into database part>. The database name is test.mdb. Thank you!
0
 
LVL 13

Accepted Solution

by:
Surone1 earned 2000 total points
ID: 24869421
i'm sorry, i dont know that part, but i did find this post http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_22640360.html which discourages adding doc files like that..
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question