Solved

Importing large chunks of data (Word document) into MS Access

Posted on 2004-10-12
9
282 Views
Last Modified: 2012-06-27
Hi,
How do I import sections of a word document into Access. Something like a letter.. Ref.. line in one field, first paragraph in second field.. etc.

Any ideas? Please help.

Thanks
0
Comment
Question by:pmandair
  • 4
  • 2
9 Comments
 
LVL 11

Expert Comment

by:Jokra_the_Barbarian
ID: 12291290
I guessing on this, but unless you are using a Word form that has different elements on the form (textbox, combo, etc.), then you really don't have anything to refer to except for the document body (containing text). You could stream the document into Access, looking for the line returns, and inserting into different table columns.

0
 
LVL 44

Expert Comment

by:GRayL
ID: 12292449
Actually, Word has a sophisicated manner of describing the content of its documents.  The best way to appreciate this is to run a recorded macro on a document and then look at the VB code produced by the Macro.  This will give you some idea how to capture the various element of such a document.
0
 
LVL 44

Expert Comment

by:GRayL
ID: 12292501
By the above, I mean open the document in word , highlight various pieces, delete, restore, and perform such functions as you will require to visualize the construct of the document. Then create a module in Access to open the document and import the various sections, having learned what to call them from the Word VB macro.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:pmandair
ID: 12297713
I'm just trying to insert the text into different fields in an Access table. When I import, everything (for e.g. all text of paragraph 1, 2) gets imported into one field..truncated. How do I define that paragraph 1 goes in field 1 of the table , paragraph 2 in field 2 of the same table... and so on..
0
 
LVL 44

Expert Comment

by:GRayL
ID: 12299346
Can you post the code you use to open, select, and transfer the Word data into Access?
0
 

Author Comment

by:pmandair
ID: 12299971
Hi GrayL,

Ok..this is what I want to achieve..
I have a letter with the 'RE:' line, 'Paragraph 1', some bullet points, Another paragraph.. and so on. you know.. a normal  letter. - a word document.

I want to import each line or pargraph in a separate row of a field in an Access table. Basically define some kind of delimited or whatever, so that when it's imported it goes in a separate row..  and I don't know how ..
Saving the word document as a txt  file and then importing into Access doesn't bring in everything.. what do I say in delimiter etc.. to bring in everything without loosing any text atall ..

Thanks
0
 
LVL 44

Accepted Solution

by:
GRayL earned 250 total points
ID: 12300368
Search EE: title:  importing Word documents into Access.  This will give you several ways of going about your task.  The third question asked by SIRISHVP shows ways of capturing Word elements and getting them into Excel and subsequently Access.  The long and short of it is Access is not structured as a document processor.  You will not be able to store Word objects in Access Text and Memo fields without seeing a lot of "funny" characters.  At best, you may be able to import them as OLE objects and retain their infor on opening the object in its native application - but this comes with a lot of overhead and if the Word files are large, you're Access tables will quicly become bloated.  You may want to rethink your goal.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

867 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now