Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Word form data to Access (2003)

    Suppose I create a Word document (a questionnaire) that contains several fill-in text fields and some Yes and No checkboxes. I distribute that document to several colleagues via email, and they send it back the same way. How might I go about collecting the information from responses and putting the data into an Access database?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Word form data to Access (2003)

    You can do this in VBA, either in Word or in Access.

    You could loop through all return e-mails in a specific Outlook folder, extract the Word document attachment, loop through the form fields in the document, and write the info to the database.
    Alternatively, you could save all returned Word documents in a specific folder, and through the documents in that folder, loop through the form fields in the document, and write the info to the database.

    If you do it from Word, you would use ADO (or DAO) to create a connection to the database and to write to it.
    If you do it from Access, you would use Automation to start Word, and run Word VBA code to process the documents.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word form data to Access (2003)

    In addition to the options Hans listed, if you have the opportunity to redesign your form, you can embed a macro (and even a button) to send you the information in a more convenient form, such as an INI-style attachment (field name = field value), or even to write directly to a database. One advantage of this approach is that the macro can validate the user's input before the data is returned to you. The downside, of course, is much more testing and support for odd individual configurations and/or security setups.

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Word form data to Access (2003)

    In addition to the suggestions already, you might also consider a different method of automating the processing of the completed forms.

    Word allows you to save a form as a text file that only contains the responses in the fields. This can make it easier to parse the completed content into a database (especially if this part is done by a programmer who won't work with Word). To do this you need to set an option - under Tools > Options > Save > Save data only for forms.

    Another alternative is to turn your Word questionaire into and Acrobat form and allow the users to submit the form via email. This way the returned file can be configured to contain only xml formatted responses which are easily absorbed into a database. The beauty of this solution is that the users don't need Word to provide the responses and the emails they send back only contain their data and not the original pdf so the network traffic is reduced. An added feature of this method is when you double click the returned file - Acrobat merges the response data with the PDF that it came from and so you can view the form as if they actually sent you the entire completed PDF.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Word form data to Access (2003)

    Wow...I began this thread thinking it might be a long shot, and now you guys have offered three ways to do the job! Thanks to all of you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •