Access Word Automation problem

J

Jim K

I am using attempting to use office automation to go from
an access form to a report. Following an example I have
been using a basWord module. As I have added fields
eveything went well until I hit memo and numeric fields.
When I try to use one of these fields I get a message that
reads "method or data member not found". Is there a way
to make this work? Code follows:

' Launch Word and load the invoice template
Set objWord = New Word.Application
objWord.Documents.Add _
Application.CurrentProject.Path & "\New-Guts.dot"
objWord.Visible = True

' Add header information using predefined bookmarks
With objWord.ActiveDocument.Bookmarks


.Item("Lname").Range.Text = frmLabPatients.LNAME _
& ", " & frmLabPatients.FNAME

If IsNull(frmLabPatients.BIRTHDATE) Then
.Item("BirthDate").Range.Text = " "
Else
.Item("BirthDate").Range.Text =
frmLabPatients.BIRTHDATE
End If
..
..
..
..Item("cellscounted").Range.Text =
frmLabPatients.CellsCounted
endwith.

Thanks Jim K.
 
J

jim K

After a large loss of hair I figured it out.
The name field in the Other Property window was not filled
in with the correct name (i.e. Text99 instead of, say,
Remarks.
 

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