Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import Microsoft Word Form into Access 1

Status
Not open for further replies.
Feb 26, 2002
5
US
I have created forms in word and would like to systemattically import them into a database. I do not know where to begin. Please help.
 
Brandon,

Are you talking about a User Form created using Word Visual Basic as an object in a Word document's VBA project. Or do you mean a Word document which is laid out as a representation of a paper form?

 
Sir,

a Word document which is laid out as a representation of a paper form with form fields.

Brandon
 
I don't think there is any way you can import a word document as a template for an Access form. What you can do, if it's of any use, is to insert bookmarks into your Word forms and save them as (dot) templates. Now you can use Automation in Access to create a reference to microsoft word, open a template and use code to locate and insert text from the database into the bookmarked locations.

Rod
 
Do you want to take the data which has entered into a number of these forms and put it in a database?
 
I do not want to import the form itself, I need to import the data from multiple forms.
 
No, I have not. I know i have to do something with bookmarks, just not sure what.
 
Brandon,
I came across an article on the Element K Journals web site called "Import data from Word forms to simplify data collection".
It walks you through setting up the Word form (fields) and the corresponding Access database.
I believe you can still order the article from their issue archives.

Eugene
 
I don't have a working solution to this problem but I am sure that you could extract information out of a Word based form using the wdGoto and Selection methods. To use these you will need to study the Word VBA help file Vbawrd8.hlp which you should find in C:\Program Files\Microsoft Office\Office.

If your Word forms are laid out carefully it will be possible to locate and select text in the form and once selected you work with the text in Access.

For instance if your Word form uses fields then it should be possible to cycle through the forms Fields collection grabbing the contents of each field and inserting the data into a suitable location in an Access variable, form field or table field.

This example comes from the above named help file.


The following example selects the first field in the active document.

ActiveDocument.Fields(1).Select


Regards
Rod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top