The code below has worked for years until my client updated their software to
2007. Now the mail merge part is broken. Any ideas?
Set myWord = New Word.Application
myWord.Visible = True
'Start a new main document for the mail merge.
Set myDoc = myWord.Documents.Open(sFileName)
With myDoc.MailMerge
.MainDocumentType = wdFormLetters
'Set up the mail merge data source.
sDBPath = CurrentProject.FullName
.OpenDataSource Name:=sDBPath, SQLStatement:="SELECT * FROM
[qryThankYou]"
.Destination = wdSendToNewDocument
.Execute Pause:=False
End With
myDoc.Close
Arvin Meyer [MVP] - 27 Oct 2007 17:49 GMT
Where (on what line) does it break?

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
> The code below has worked for years until my client updated their software
> to
[quoted text clipped - 20 lines]
>
> myDoc.Close