R
Rocky
I have created a Word Merge Document that looks at a table in Access.
The table is created from a make table querie, based on the client id
on the form I have open. I then created a command button to open the
merge document, using the foillowing code:
Function Merge_Contract()
Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "C:\WFFG Database\Merge Contract.doc"
If Dir(LWordDoc) = "" Then
MsgBox "Document not found."
Else
'Create an instance of MS Word
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True
'Open the Document
oApp.Documents.Open filename:=LWordDoc
End If
End Function
The proble ois that when I open the document, it loses its links and I
have to start the mail merge process all over again
The table is created from a make table querie, based on the client id
on the form I have open. I then created a command button to open the
merge document, using the foillowing code:
Function Merge_Contract()
Dim LWordDoc As String
Dim oApp As Object
'Path to the word document
LWordDoc = "C:\WFFG Database\Merge Contract.doc"
If Dir(LWordDoc) = "" Then
MsgBox "Document not found."
Else
'Create an instance of MS Word
Set oApp = CreateObject(Class:="Word.Application")
oApp.Visible = True
'Open the Document
oApp.Documents.Open filename:=LWordDoc
End If
End Function
The proble ois that when I open the document, it loses its links and I
have to start the mail merge process all over again