Exporting Data from MS Word to MS Access db

N

Nam

I am developing an MS Word 200 Add-In that requires collecting certain
sentences from MS Word document and storing it into MS Access 2000. I would
like to achieve this task without worrying about installing (or registering)
DAO or ADO etc on the client’s machine. Does MS office have a built-in data
migration functionality that I can use in my VBA macros?

Thanks in Advance,
Nam
 
A

alborg

Hi Nam:

There is no such beast in MS Word VBA. You have to use DAO or ADO. What I do
is to do an Installshield setup to install the various dlls into their
appropriate places in the new host computers. This gets tedious, though, as
you need to get the dlls for MS Access 2000/2002/2003 and now the 2007
versions.

Cheers,
Al
 
N

Nam

Thank you Alborg for your response. I was thinking MS may have something like
MSQuery that I could use to achieve this task.

Nam
 
G

gllincoln

Hi Nam,

Assuming Access isn't installed on the client machine, take a look at XML -
might be a good alternative for you. Another alternative would be to create
your own csv file format - append the Word doc sentences to that csv file
along with a timestamp, maybe the full doc name, and some sort of key
column - maybe a roll-your-own autonumber. You could link to that csv from
Access and update whatever tables as appropriate querying the data from that
record source. This isn't as complicated as it sounds - if you are far
enough into VBA to create Add-Ins for clients, then you can probably handle
the file management code.

If Access is installed on the client machine then you can use the Access
Application object to open the database, insert your data where you wish,
and close the database from VBA code running in Word.

Hope this helps,
Gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top