Desperate

Haynesey

Registered User.
Local time
Today, 11:22
Joined
Dec 19, 2001
Messages
190
When I do a mail merge into word, the database opens another 3 versions of itself before the mail merge happens. Is their any way to stop this happening? The code I am using is:


Dim objWord As Word.Document
Set objWord = GetObject("J:\Admin\ISES\P_CapitaBookingForm.dot", "Word.Document")

' Make Word visible.
objWord.Application.Visible = True

' Set the mail merge data source
objWord.MailMerge.OpenDataSource Name:="J:\Admin\ISES\ISES.mdb", _
LinkToSource:=True, _
Connection:="Query qryCourseBookingMailMerge"

objWord.MailMerge.Destination = wdSendToNewDocument
objWord.MailMerge.Execute

'The following line must follow the Execute statement because the PrintBackground property is available only when a document window is active. Without this line of code, the function will end before Word can print the merged document.

objWord.Application.Options.PrintBackground = False
objWord.Application.ActiveDocument.PrintOut

Please help

Thanks
Lee
 

Users who are viewing this thread

Back
Top Bottom