Solved

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

Posted on 2004-10-12
9
293 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

821 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