Import Word form into Access

  • Thread starter Thread starter Guest
  • Start date Start date
how can I import drop down form field from word into access?

The details depend on many things:

-whether you want to get the current value of the field or the actual
list of values in the dropdown
-what you want to with it once you get hold of it.

One method is to protect the Word document for forms and then save only
the data in the form fields. This gives you a text file that Access can
usually import.

Otherwise you have to use Automation to grab the value, something like
this air code, which requires a reference to the Microsoft Word Object
library:

Dim oWordDoc As Word.Document
Dim strValue As String

'open the document
Set oWordDoc = GetObject("C:\Folder\FileName.Doc")

'get the value from the formfield
strValue = oWordDoc.FormFields("FieldName").Range.Text

'do what you want with it
...

'close the document without saving
oWordDoc.Close False
Set oWordDoc = Nothing
 
Back
Top