Hello!
I got the following code:
Function MergeIt()
Dim objWord As Word.Document
Set objWord = GetObject("selectet path", "Word.Document")
' Make Word Visible.
objWord.Application.Visible = True
' Set the Mail Merge data Source.
objWord.MailMerge.OpenDataSource Name:="current db", LinkToSource:=True, Connection:="TABLE tests", SQLStatement:="Select * from [tests]"
' Execute the Mail Merge.
objWord.MailMerge.Execute
End Function
'(hope that it is readable)'
This code works perfectly but in the document he puts after one merged record a section brake(next page) but I want a page break.
Also I've got some OLE objects in the selected table wich are MS-Word Documents. In the document I only get to see is: Long binary or text value, but not the MS-Word document in the selected table.
Could Anyone help me with this
Greetz,
Martijn ;p
I got the following code:
Function MergeIt()
Dim objWord As Word.Document
Set objWord = GetObject("selectet path", "Word.Document")
' Make Word Visible.
objWord.Application.Visible = True
' Set the Mail Merge data Source.
objWord.MailMerge.OpenDataSource Name:="current db", LinkToSource:=True, Connection:="TABLE tests", SQLStatement:="Select * from [tests]"
' Execute the Mail Merge.
objWord.MailMerge.Execute
End Function
'(hope that it is readable)'
This code works perfectly but in the document he puts after one merged record a section brake(next page) but I want a page break.
Also I've got some OLE objects in the selected table wich are MS-Word Documents. In the document I only get to see is: Long binary or text value, but not the MS-Word document in the selected table.
Could Anyone help me with this
Greetz,
Martijn ;p