expublish
Registered User.
- Local time
- Today, 16:35
- Joined
- Feb 22, 2002
- Messages
- 121
I am setting up a mail merge based on a query that filters data from a table. I have it setup mostly correct apart from one bit. I think it is this bit thats wrong:
objWord.MailMerge.OpenDataSource _
Name:=CurrentDb.Name, _
linktosource:=True, _
Connection:="QUERY empunit-mm-head", _
SQLStatement:="Select * FROM [empunit-mm-head]"
objWord.MailMerge.Execute
This is pulled out of the whole lot of code. If you need the whole lot let me know. The query that holds the data that is being merged is called empunit-mm-head.
I am getting the message 'File name or class name not found during the automation process'.
Can anyone help?
Scott.
objWord.MailMerge.OpenDataSource _
Name:=CurrentDb.Name, _
linktosource:=True, _
Connection:="QUERY empunit-mm-head", _
SQLStatement:="Select * FROM [empunit-mm-head]"
objWord.MailMerge.Execute
This is pulled out of the whole lot of code. If you need the whole lot let me know. The query that holds the data that is being merged is called empunit-mm-head.
I am getting the message 'File name or class name not found during the automation process'.
Can anyone help?
Scott.