Thanks for your reply. I made one change that fixed this.
1. I called "WordApp.ActiveDocument.MailMerge.OpenDataSource" after
opening the document.
Here is the code sample:
..
Set WordDoc = WordApp.Documents.Open(strDocName)
strActiveDoc = WordApp.ActiveDocument.Name
strPathName = WordApp.ActiveDocument.Path
strTempName = strPathName + "\" +
GetFileName_NoExtension(strActiveDoc) + ".888"
On Error GoTo ERROR_HANDLER
'Open the text file data source and process the mail merge
WordApp.ActiveDocument.MailMerge.OpenDataSource Name:= _
strTempName _
, ConfirmConversions:=False, ReadOnly:=False,
LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="",
Revert:=False, _
Format:=0, Connection:="", SQLStatement:="", SQLStatement1 _
:=""
With WordApp.ActiveDocument.MailMerge
.Destination = 0 ' 0 = new doc
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = 1
.LastRecord = 1
End With
.Execute Pause:=True
End With
WordDoc.Close (False)
..
Fortunately this change seems to also work for previous versions of
Access as well.
Thanks
ucmlamb
Peter Jamieson Wrote:
> I can't be sure, but I suspect you need to follow the instructions in
> this
[quoted text clipped - 88 lines]
> --
> ucmlamb

Signature
ucmlamb