Solved

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

Posted on 2004-10-12
9
297 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

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…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

839 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