Solved

Sql query for importing .doc files in a table

Posted on 2009-07-16
3
180 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
  • 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 500 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

820 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