How do I use Visual Basic to extract data from forms in Word?

J

joeyb

I am trying to extract individual entered fields in a filled-in form in Word
using Visual Basic. I would like to be able to run a procedure on filled-in
(completed) forms to quickly extraction of data on many forms. What commands
can I use to extract the data from the individual form fields. I am assuming
that I need to name the form fields to some unique name to enable this.
 
J

Jezebel

Form fields are automatically named as bookmarks, but you might want to
assign your own - more meaningful - names.

From VBA, use something like

ActiveDocument.Bookmarks([FieldName]).Range

to retrieve the contents
 

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