Solved

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

Posted on 2004-10-12
9
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

732 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