Access to Word merge

hbaggs

Registered User.
Local time
Today, 09:08
Joined
Feb 5, 2004
Messages
39
I have a query which populates a form with one record.

I have a list box on that form which is a list of current Word Merege documents. (created in Word 2000 and Access2000)

I am upgrading to Word and Access 2003 and I am wanting to merge the data from the record displayed on the form into the Word Merge Document contained in the List Box.

How is my Code deficient? This process worked fine in Access 2000 opening a Word 2000 merge document…

Using Access 2003 and Word 2003 this is opening the correct document from the List Box it does not connect to the data on the form…





On Click Event on a command button on the Form
Private Sub Command331_Click()
On Error Resume Next
Dim WordOBJ As Word.Application
Set WordOBJ = GetObject(, "WORD.APPLICATION")
If Err.Number <> 0 Then
Set WordOBJ = CreateObject("Word.Application")
End If
WordOBJ.Visible = True
WordOBJ.Documents.Open ("c:\AccessDocs\" & [Form_LettersOther]![List62])
DoEvents
WordOBJ.Activate
WordOBJ.Visible = True
Set WordOBJ = Nothing

End Sub
 

Users who are viewing this thread

Back
Top Bottom