Importing data From Word Form to Access

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hello,

Is it possible to import or merge a Word Form into an Access database?
I have a master form template with text form fields that we want to
import into access after the info has been entered.

This Word form is a 20 page Legal Document. We need to keep track of
certain fields.

I don't know if this is possible.

Steve
 
Hi Steve,
Is it possible to import or merge a Word Form into an Access database?
I have a master form template with text form fields that we want to
import into access after the info has been entered.

This Word form is a 20 page Legal Document. We need to keep track of
certain fields.
This is possible. Simplest would be to activate the "Save data only"
option in Tools/Options/Save. This would give you a delimited text file
that can be imported into Access and appended to an existing table.

Or, you could automate it (use a macro). Do you have any VBA experience
in Word or Access?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Cindy, I have no Word VBA experience, but have a form that I'd like to have
automatically save both the form (as designed), and also push the data to an
access database.

Can you help me with the VBA code?

DGjr.
 
Hi =?Utf-8?B?REdqci4=?=,
Cindy, I have no Word VBA experience, but have a form that I'd like to have
automatically save both the form (as designed), and also push the data to an
access database.

Can you help me with the VBA code?
Access data programming experience (DAO or ADO)?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
I have neither DAO or ADO. I'd like to think I could figure some of it out on
the fly though if the code is straight forward enough. Let me know if you
could help.

DGjr.
 
Hi =?Utf-8?B?REdqci4=?=,
I have neither DAO or ADO. I'd like to think I could figure some of it out on
the fly though if the code is straight forward enough.
IF you have Access, you have DAO and ADO. These are the protocols for working
directly with the datasets; DAO (Data Access Objects) is Access "native" one;
ADO (ActiveX Data Objects) is more generally applicable (replaces ODBC).
have a form that I'd like to have
automatically save both the form (as designed), and also push the data to an
access database.
Well, the basic syntax for passing the data is

rs.Fields("name").Value = doc.Formfields("name").Result

But before you can use that, you have to understand how to build a connection
to the table (recordset) in a database, and loop through its contents. You'll
find a sample file - WdAcc97.zip - in the mail merge section of my website that
shows how to transfer data between Access and Word using VBA. It doesn't deal
with forms, but it will show you how to connect to an Access database/table,
create a recordset, loop through it, and pass in data. Once you understand how
that works, you can use the line of code above to make it work with formfields.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
Back
Top