Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Can Form Field text be exported from Word?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad Moss - 28 Jan 2008 22:48 GMT
I have a Word document with form fields. I will have users enter text into
the form fields. I would then like to export the data from the form fields
into a database. And, it is important that I have some way of tagging each
bit of data entered to a item number listed on the page the data was entered
into. I am sure there is a way to do this, yet can't figure out exactly how
to pull it off. Any help or comments offered would be appreciated.

Take care,
Brad
Doug Robbins - Word MVP - 29 Jan 2008 02:24 GMT
You will find the basics in the last of the following series of articles:

Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22

Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46

Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119

Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127

Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I have a Word document with form fields. I will have users enter text into
> the form fields. I would then like to export the data from the form fields
[quoted text clipped - 7 lines]
> Take care,
> Brad
alborg - 30 Jan 2008 10:50 GMT
Hi Brad:

What you need to do is to use UserForms where the data is uploaded to
UserForm fields, then you use DAO to transfer the data onto a backend
database.

For example, in a UserForm_Initialize() event you might have something like
this to bring up a date from an ActiveForm's date field:

[schDate] = ActiveDocument.Tables(3).Cell(myRow,
ActiveDocument.Tables(3).Columns.Count - 1).Range.FormFields(1).Result

After you pull up all the information, you can do this to send the
information to the underlying table:

Set db = OpenDatabase(conDBpath2)
Set rs = db.OpenRecordset("SELECT Demographics.* FROM Demographics;",
dbOpenDynaset)
   With rs
       .MoveLast
       .AddNew
        ![Last] = IIf(IsNull([LNAME]) Or Len([LNAME]) = 0, ".", [LNAME])
        ![First] = IIf(IsNull([FNAME]) Or Len([FNAME]) = 0, ".", [FNAME])
        ![ChartID] = IIf(IsNull([ACCT]), 0, [ACCT])
        ![BirthDate] = IIf(IsNull([DOB]) Or Len([DOB]) = 0, #1/1/1911#,
[DOB])
        .Update
        .Close
        db.Close
   End With

That's all there is to it.

Cheers,
Al

> I have a Word document with form fields. I will have users enter text into
> the form fields. I would then like to export the data from the form fields
[quoted text clipped - 5 lines]
> Take care,
> Brad
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.