Solved

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

Posted on 2004-10-12
9
270 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 Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
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…

760 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

18 Experts available now in Live!

Get 1:1 Help Now