I am currently using code to pass information from the user to an MS Word mail merge. The user brings up the information they want, clicks the export button, selects the form letter they want (listbox), and clicks Merge which then opens the particular form letter with the information they selected. This all works fine with a .mdb version but when I convert to a .mbe, Access won't allow me to export. My code is as follows;
Public Function MergeIt(doc As String)
Dim objWord As Word.Document
doc = "J:\BEA\AppLetters\" & doc
Set objWord = GetObject(doc, "Word.Document"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
objWord.Application.Visible = True
objWord.MailMerge.OpenDataSource _
Name:="C:\Program Files\PABLE\Database.mde", _
LinkToSource:=True, _
Connection:="QUERY WordMergeParm_qry"
objWord.MailMerge.Execute
End Function
Any thoughts??
Public Function MergeIt(doc As String)
Dim objWord As Word.Document
doc = "J:\BEA\AppLetters\" & doc
Set objWord = GetObject(doc, "Word.Document"
objWord.Application.Visible = True
objWord.MailMerge.OpenDataSource _
Name:="C:\Program Files\PABLE\Database.mde", _
LinkToSource:=True, _
Connection:="QUERY WordMergeParm_qry"
objWord.MailMerge.Execute
End Function
Any thoughts??