auto-extract fields from word - auto-paste into excel at next row

G

Guest

Word document has info like name: ______ , phone number _______, company
_______ etc. (it isn't a phonebook, just has similar fields).

I want users (employees) to enter the information in word, and then have
word send out the info they type in to excel, and save as a database type
worksheet.

So for the example above, when users click save after typing in the info,
the info they type in goes to a certain excel file (not a new one) and puts
the info in the next available row. Column 1 would be Name, Column 2 would
be phone number etc...

I essentially want the users to use only word, but still maintain a database
for data input.

I thnk MS access can do this type of thing, but I'm sure word/excel can too.

Final example to get my point accross.

In Word:

Input 1: Larry
Input 2: 123-456-7890
Input 3: California

Users enter inputs, then hit save. Upon save (in the background), an excel
file is updated (at the next availabe row) with :

Column 1, row x = Larry
Column 2, row x = 123-456-7890
Column 3, row x = California

The next time that same word document is opened and different info is
inputted, excel should add a row 'y', with the new info.

FYI: The word document is a professional page with professional looking
formating (this is our problem with access).

Any help would be appreciated!

Thanks!
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?c3dvb29w?=,

Best would be to use Form Fields for the input and protect the document (or
this section of it) as a form. You can be sure, that way, of not losing the
"target areas", as could happen with bookmarks. The basic code to extract the
content of a form field:
sStringVar = ActiveDocument.FormFields("Name").Result

There are articles on the word.mvps.org site on automating Excel for data
exchange. Another alternate approach would be to use ADO. Personally, I'd
prefer to do this with Access rather than Excel. ADO can be a bit "touchy" when
used with Excel to update an existing table.
Word document has info like name: ______ , phone number _______, company
_______ etc. (it isn't a phonebook, just has similar fields).

I want users (employees) to enter the information in word, and then have
word send out the info they type in to excel, and save as a database type
worksheet.

So for the example above, when users click save after typing in the info,
the info they type in goes to a certain excel file (not a new one) and puts
the info in the next available row. Column 1 would be Name, Column 2 would
be phone number etc...

I essentially want the users to use only word, but still maintain a database
for data input.

I thnk MS access can do this type of thing, but I'm sure word/excel can too.

Final example to get my point accross.

In Word:

Input 1: Larry
Input 2: 123-456-7890
Input 3: California

Users enter inputs, then hit save. Upon save (in the background), an excel
file is updated (at the next availabe row) with :

Column 1, row x = Larry
Column 2, row x = 123-456-7890
Column 3, row x = California

The next time that same word document is opened and different info is
inputted, excel should add a row 'y', with the new info.

FYI: The word document is a professional page with professional looking
formating (this is our problem with 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 :)
 

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